RFR: Ensure compensate when ForkJoinWorkerThread is pinned
Miao Zheng
duke at openjdk.java.net
Fri Oct 29 08:26:00 UTC 2021
Hello,
We have a test case about Loom, it can pass before;
The test case can be seen on this PR;
But it cannot pass after this patch:
commit de90a43c7a5f0b28bd0af9271de210475808ca0c
Author: Alan Bateman <alan.bateman at oracle.com>
Date: Wed Sep 1 09:22:23 2021 +0100
Replace lock/condition objects to simplify pinned park
Actually, this modify cause the test fail, because getCondition.await() will call tryCompensate() of ForkJoinPool eventually:
+ private void parkOnCarrierThread(long nanos) {
- if (!parkPermit) {
- // wait to be signalled or interrupted
- getCondition().await();
+ if (!parkPermit) {
+ U.park(false, nanos);
}
```
If ForkJoinWorkerThread are all pinned, how to make vt work correct?
Thanks,
Miao
-------------
Commit messages:
- Ensure compensate when ForkJoinWorkerThread is pinned
Changes: https://git.openjdk.java.net/loom/pull/80/files
Webrev: https://webrevs.openjdk.java.net/?repo=loom&pr=80&range=00
Stats: 87 lines in 1 file changed: 87 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/loom/pull/80.diff
Fetch: git fetch https://git.openjdk.java.net/loom pull/80/head:pull/80
PR: https://git.openjdk.java.net/loom/pull/80
More information about the loom-dev
mailing list