Re: RFR: 8373118: Test java/lang/Thread/virtual/Starvation.java timed out [v29]

2026-02-09 Thread Doug Lea
On Mon, 26 Jan 2026 12:43:42 GMT, Viktor Klang  wrote:

>> Doug Lea has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Don't oversignal LIFO
>
> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1058:
> 
>> 1056: static final int MAX_CAP  = 0x7fff;   // max # workers
>> 1057: static final int EXTERNAL_ID_MASK = 0x3ffe;   // max external 
>> queue id
>> 1058: static final int INVALID_ID   = 0x4000;   // unused external 
>> queue id
> 
> @DougLea INVALID_ID looks to be unused now so we could remove it.

Thanks, done.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2779769083


Re: RFR: 8373118: Test java/lang/Thread/virtual/Starvation.java timed out [v29]

2026-01-27 Thread Viktor Klang
On Sun, 25 Jan 2026 20:09:13 GMT, Doug Lea  wrote:

>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Don't oversignal LIFO

I ran some experiments trying to relax some reads to WorkQueue.source but it 
does indeed seem like they are required to be at least non-plain reads.

-

PR Comment: https://git.openjdk.org/jdk/pull/28797#issuecomment-3804809370


Re: RFR: 8373118: Test java/lang/Thread/virtual/Starvation.java timed out [v29]

2026-01-26 Thread Viktor Klang
On Sun, 25 Jan 2026 20:09:13 GMT, Doug Lea  wrote:

>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Don't oversignal LIFO

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1787:

> 1785: (phase = w.phase) != 0 && (phase & IDLE) != 0)
> 1786: releaseWaiters();  // ensure released
> 1787: if (w == null || w.source != DROPPED) {

@DougLea Do we need a volatile read of `source` here, or would a weaker access 
read be sufficient? (since w.phase is already volatile-y read prior to this 
read)

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 2247:

> 2245: int s = 0;
> 2246: if (task != null && (s = task.status) >= 0 && internal && w != 
> null) {
> 2247: int wid = w.phase & SMASK, r = wid + 2, wsrc = w.source;

@DougLea Same comment here w.r.t. the w.source access

-

PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2727970871
PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2727978715


Re: RFR: 8373118: Test java/lang/Thread/virtual/Starvation.java timed out [v29]

2026-01-26 Thread Viktor Klang
On Sun, 25 Jan 2026 20:09:13 GMT, Doug Lea  wrote:

>> Changes signal filtering to avoid possible starvation
>
> Doug Lea has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Don't oversignal LIFO

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1058:

> 1056: static final int MAX_CAP  = 0x7fff;   // max # workers
> 1057: static final int EXTERNAL_ID_MASK = 0x3ffe;   // max external queue 
> id
> 1058: static final int INVALID_ID   = 0x4000;   // unused external 
> queue id

@DougLea INVALID_ID looks to be unused now so we could remove it.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/28797#discussion_r2727470227


Re: RFR: 8373118: Test java/lang/Thread/virtual/Starvation.java timed out [v29]

2026-01-25 Thread Doug Lea
> Changes signal filtering to avoid possible starvation

Doug Lea has updated the pull request incrementally with one additional commit 
since the last revision:

  Don't oversignal LIFO

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/28797/files
  - new: https://git.openjdk.org/jdk/pull/28797/files/02ddb13d..04928c94

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28797&range=28
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28797&range=27-28

  Stats: 155 lines in 1 file changed: 34 ins; 52 del; 69 mod
  Patch: https://git.openjdk.org/jdk/pull/28797.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28797/head:pull/28797

PR: https://git.openjdk.org/jdk/pull/28797