RFR: 8286597: Implement PollerProvider on AIX [v4]
Alan Bateman
alanb at openjdk.org
Thu May 11 05:37:47 UTC 2023
On Wed, 10 May 2023 22:39:48 GMT, Tyler Steele <tsteele at openjdk.org> wrote:
>> This PR finalizes VThreads on AIX. After the heavy lifting was done by the lovely reinrich, all that remained was to implement the abstract methods in the Poller class. This was quite straightforward after I figured out that the Pollset library does not pick up on changes to the set of fds while blocked on a poll call.
>>
>> ### Notes
>>
>> As mentioned above, the Pollset library won't recognize changes made to the set of fds while blocked on a call to `poll`. In order to allow the other threads to make changes to the pollset, I had to set a short (max 100ms) timeout for the call to poll in order to ensure that the pollset is refreshed. In my testing, this was a far more reliable solution than using a wakeup fd.
>>
>> I provided an empty implementation of two procedures in `src/hotspot/cpu/ppc/continuationHelper_ppc.inline.hpp` with some deductive work. Examining other implementations, I see they delegate this to `update_map_with_saved_link`. This is empty in `frame_ppc.inline.hpp`, so I concluded that there is nothing to do for the two continuationHelper procedures either. I wouldn't mind a second opinion on this choice.
>>
>> The test `testSocketReadPeerClose2` in BlockingSocketOps was modified because setting so_linger doesn't cause an exception to be thrown on AIX. The underlying read call returns -1 as will other platforms, but instead of setting ECONNRESET, AIX just sets EAGAIN. I feel that this test may just not be feasible on AIX, and I've modified it accordingly.
>>
>> I modified the timeout factor for the virtual/stress/Skynet.java test. This test passes without issue on my build & test system when run on its own, but when run as part of a test suite (eg. `make test TEST=jdk_loom`), it does not have enough time with the timeout previously specified in the test file.
>>
>> ### Testing
>>
>> The following tests were performed on AIX.
>>
>> - [x] T1 tests
>> - [x] hotspot_loom w/ -XX:+VerifyContinuations
>> - [x] jdk_loom w/ -XX:+VerifyContinuations
>
> Tyler Steele has updated the pull request incrementally with two additional commits since the last revision:
>
> - Improve comment in ContinuationHelper procedures
> - Completes removal of include from adlc/main.cpp
test/jdk/java/lang/Thread/virtual/stress/Skynet.java line 28:
> 26: * @summary Stress test virtual threads with a variation of the Skynet 1M benchmark
> 27: * @requires vm.continuations
> 28: * @run main/othervm/timeout=350 -Xmx1g Skynet
I assume this should be dropped from this PR as it is nothing to do with implement the AIX version of PollerProvider.
test/jdk/java/net/vthread/BlockingSocketOps.java line 62:
> 60:
> 61: import jdk.test.lib.thread.VThreadRunner;
> 62: import jdk.test.lib.Platform;
This seems to be left over from one of your previous iterations.
test/jdk/java/net/vthread/BlockingSocketOps.java line 192:
> 190: s2.setSoLinger(true, 0);
> 191: s2.close();
> 192: });
This is okay but shouldn't be necessary as the linger option was set before starting the thread to close the other end. The linger setting is per socket rather than per-thread so curious why the original was problematic on AIX.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13452#discussion_r1190652693
PR Review Comment: https://git.openjdk.org/jdk/pull/13452#discussion_r1190652833
PR Review Comment: https://git.openjdk.org/jdk/pull/13452#discussion_r1190654477
More information about the nio-dev
mailing list