Re: RFR: 8307483: New micros for j.u.c.LockSupport [v4]

2023-05-17 Thread Eric Caspole
> These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads. Eric Caspole has updated the pull request incrementally with one

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v3]

2023-05-17 Thread Claes Redestad
On Tue, 9 May 2023 19:13:42 GMT, Eric Caspole wrote: >> These micros were developed while investigating JDK-8305670 by myself and >> Sergey Kuksenko. The order of thread creation was important in that bug, so >> there are 2 JMH for creating sleepers before and after the worker threads. > > Eric

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v3]

2023-05-17 Thread Aleksey Shipilev
On Tue, 9 May 2023 19:13:42 GMT, Eric Caspole wrote: >> These micros were developed while investigating JDK-8305670 by myself and >> Sergey Kuksenko. The order of thread creation was important in that bug, so >> there are 2 JMH for creating sleepers before and after the worker threads. > > Eric

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v3]

2023-05-16 Thread Eric Caspole
On Tue, 9 May 2023 19:13:42 GMT, Eric Caspole wrote: >> These micros were developed while investigating JDK-8305670 by myself and >> Sergey Kuksenko. The order of thread creation was important in that bug, so >> there are 2 JMH for creating sleepers before and after the worker threads. > > Eric

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v3]

2023-05-09 Thread Eric Caspole
> These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads. Eric Caspole has updated the pull request incrementally with one

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v2]

2023-05-09 Thread Eric Caspole
> These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads. Eric Caspole has updated the pull request incrementally with one

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-08 Thread David Holmes
On Mon, 8 May 2023 10:01:49 GMT, Viktor Klang wrote: >> Same as we saw with `isAlive` before: `LockSupport.park` implicitly provides >> a compiler barrier. This `done` should be at least "opaque" to carry the >> same effect. > > Yes, `park()` and `unpark()` having release and acquire semantics

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-08 Thread David Holmes
On Tue, 9 May 2023 02:23:51 GMT, David Holmes wrote: >> Yes, `park()` and `unpark()` having release and acquire semantics is not >> documented >> [here](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/concurrent/locks/LockSupport.html#park()), >> and the documentation fo

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-08 Thread Viktor Klang
On Mon, 8 May 2023 09:21:54 GMT, Aleksey Shipilev wrote: >> Yes `done` must be volatile. Surprised this even worked as expected. > > Same as we saw with `isAlive` before: `LockSupport.park` implicitly provides > a compiler barrier. This `done` should be at least "opaque" to carry the same > eff

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-08 Thread Aleksey Shipilev
On Mon, 8 May 2023 05:58:26 GMT, David Holmes wrote: >> test/micro/org/openjdk/bench/java/util/concurrent/UnparkBenchSleepersAfter.java >> line 131: >> >>> 129: public void run() { >>> 130: my_thread = Thread.currentThread(); >>> 131: while (!done) { >> >> You m

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-08 Thread Aleksey Shipilev
On Thu, 4 May 2023 20:17:11 GMT, Eric Caspole wrote: > These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads. Cursory st

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-07 Thread David Holmes
On Fri, 5 May 2023 14:31:29 GMT, Alan Bateman wrote: >> These micros were developed while investigating JDK-8305670 by myself and >> Sergey Kuksenko. The order of thread creation was important in that bug, so >> there are 2 JMH for creating sleepers before and after the worker threads. > > test

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-05 Thread Alan Bateman
On Thu, 4 May 2023 20:17:11 GMT, Eric Caspole wrote: > These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads. test/micro

RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-04 Thread Eric Caspole
These micros were developed while investigating JDK-8305670 by myself and Sergey Kuksenko. The order of thread creation was important in that bug, so there are 2 JMH for creating sleepers before and after the worker threads. - Commit messages: - 8307483: New micros for j.u.c.LockSu