Compensate when Pinned
Ron Pressler
ron.pressler at oracle.com
Thu Nov 18 13:36:41 UTC 2021
Sorry, this message was stuck in the mailing-list's queue. This matter has been addressed.
> On 28 Oct 2021, at 04:00, emoryzheng(郑淼) <emoryzheng at tencent.com> wrote:
>
> Hello,
> We have a test case about Loom, it can pass before;
> The test case can be seen on attach file;
>
> 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 there are 4 ForkJoinWorkerThread, and they are all pinned, how to make vt work correct?
>
> Thanks,
>
> Miao
More information about the loom-dev
mailing list