RFR(S): 8034801: AIX: (ch) Fix synchronization issue in AixPollPort.java

Alan Bateman Alan.Bateman at oracle.com
Wed Feb 12 13:38:56 PST 2014


I assume it's not very efficient to have to queue changes and do a 
wakeup per I/O operation but it looks okay from a correctness point of view.

-Alan


On 12/02/2014 17:41, Volker Simonis wrote:
> Hi,
>
> could you please review the following small, AIX-only change:
>
> http://cr.openjdk.java.net/~simonis/webrevs/8034801/
> https://bugs.openjdk.java.net/browse/JDK-8034801
>
> On AIX we use the AIXPollPort class to wrap the native pollset functionality.
>
> AIXPollPort is based on the Linux EPollPort class. But on AIX there's
> an extra difficulty - we can not modify (with pollset_ctl()) and query
> (with pollset_poll()) a pollset concurrently (like this is possible on
> Linux with epoll_ctl() and epoll_wait()).
>
> We have therefore synchronized calls to pollset_ctl() and
> pollset_poll() by using an extra control queue which handles these
> calls sequentially.
>
> This implementation has an error which can lead to a deadlock if we
> have a pending pollset_ctl() event in the control queue while the
> corresponding pollset is already empty.
>
> This change fixes the problem. It also reduces the number of calls to
> pollsetCtl() by checking more exactly which descriptors are removed
> from a pollset (thus avoiding calls to pollsetCtl() which just
> reinsert a previously deleted descriptor).
>
> This change is for jdk9/hs-comp/jdk (because that’s currently the only
> repo with a full AIX-port. But it will be also needed for the downport
> to jdk8u, once our port will be integrated there.
>
> Thank you and best regards,
> Volker



More information about the ppc-aix-port-dev mailing list