RFR: (jdk7) 7200742: (se) Selector.select does not block when starting Coherence (sol11u1)

Rob McKenna rob.mckenna at oracle.com
Thu Sep 27 14:00:06 PDT 2012


Backport (hg import) of Alans fix to jdk7.

http://cr.openjdk.java.net/~robm/7200742/webrev.01/ 
<http://cr.openjdk.java.net/%7Erobm/7200742/webrev.01/>

 From Alan's original mail:

I need a reviewer for a change that resolves a regression in the Solaris /dev/poll based Selector. The regression stems from the changes for 7169050 [1] whereby a POLLREMOVE is no longer written to the driver when changing events. As the events are OR'ed in the kernel it creates the potential for spinning when changing the interest ops from say OP_WRITE to OP_READ and vice versa.

It's somewhat surprising that the issue wasn't caught by any of the tests but they tend not to notice performance issues.  It probably hasn't been noticed by many servers either as typically events are handed over to worker threads and that typically involves setting the interest ops to 0 before the hand off (changing the interest ops to 0 causes a POLLREMOVE to be written). The issue only arises when changing the interest ops without changing to 0.

The webrev with the changes is here and I've got a test that exercises all possible transitions.

http://cr.openjdk.java.net/~alanb/7200742/webrev/

As 7169050 was back-ported to jdk7u it means that the changes here will need to be back-ported too.

Thanks,

Alan.


     -Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120927/851bd7df/attachment.html 


More information about the nio-dev mailing list