Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wisp] Fix overwrite PERMITTED status in lazySet #63

Merged

Conversation

joeyleeeeeee97
Copy link
Contributor

Summary: In wisp1 we use direct scheduler wakeup instead
of park/unpark for coroutine timed-waiting, so for historical
reason exists a manual status fix to lazy set status to free.
But in wisp2 when timer is waken up by unpark, a PERMITTED
may be overwriten and cause problem.

Test Plan: com/alibaba/rcm/

Reviewed-by: leiyu, zhengxiaolinX, sanhong.lsh

Issue: dragonwell-project/dragonwell8#236

@@ -0,0 +1,62 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the jtreg annotations(@\summary,@\run)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jtreg test will run for one second.
svt mode will run forever

Copy link
Contributor

@zhengxiaolinX zhengxiaolinX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good to me.

@@ -0,0 +1,114 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The license is not right - it needs to be as below, and the year should be 2021.

/*
 * Copyright (c) 2021, Alibaba Group Holding Limited. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

Summary: In wisp1 we use direct scheduler wakeup instead
of park/unpark for coroutine timed-waiting, so for historical
reason exists a manual status fix to lazy set status to free.
But in wisp2 when timer is waken up by unpark, a PERMITTED
may be overwriten and cause problem.

Test Plan: com/alibaba/rcm/

Reviewed-by: leiyu, zhengxiaolinX, sanhong.lsh

Issue: dragonwell-project/dragonwell8#236
@joeyleeeeeee97 joeyleeeeeee97 merged commit a0fc417 into dragonwell-project:master Jul 9, 2021
Sere-Fu pushed a commit to Sere-Fu/dragonwell11 that referenced this pull request Sep 1, 2021
Summary:
- ThreadLocal Preempt
Support coroutine preempt base on thread-local
handshake rather than global safepoint.
- Fix lost unpark in lazySet
dragonwell-project/dragonwell8_jdk#63
- Add container info in jstack output
https://github.com/alibaba/dragonwell8_hotspot/pull/96/files
- Add support for thread ids in root container
dragonwell-project/dragonwell8_jdk#62

Test Plan: wisp rcm tests

Reviewers: lei.yul, sanhong.lsh

Issue: https://aone.alibaba-inc.com/task/35465365

CR: https://code.aone.alibaba-inc.com/xcode/jdk11/codereview/5856676
Sere-Fu pushed a commit to Sere-Fu/dragonwell11 that referenced this pull request Sep 2, 2021
Summary:
- ThreadLocal Preempt
Support coroutine preempt base on thread-local
handshake rather than global safepoint.
- Fix lost unpark in lazySet
dragonwell-project/dragonwell8_jdk#63
- Add container info in jstack output
https://github.com/alibaba/dragonwell8_hotspot/pull/96/files
- Add support for thread ids in root container
dragonwell-project/dragonwell8_jdk#62

Test Plan: wisp rcm tests

Reviewers: lei.yul, sanhong.lsh

Issue: https://aone.alibaba-inc.com/task/35465365

CR: https://code.aone.alibaba-inc.com/xcode/jdk11/codereview/5856676
yuleil pushed a commit to yuleil/dragonwell11 that referenced this pull request Jul 22, 2022
Summary:
- ThreadLocal Preempt
Support coroutine preempt base on thread-local
handshake rather than global safepoint.
- Fix lost unpark in lazySet
dragonwell-project/dragonwell8_jdk#63
- Add container info in jstack output
https://github.com/alibaba/dragonwell8_hotspot/pull/96/files
- Add support for thread ids in root container
dragonwell-project/dragonwell8_jdk#62

Test Plan: wisp rcm tests

Reviewers: lei.yul, sanhong.lsh

Issue: https://aone.alibaba-inc.com/task/35465365

CR: https://code.aone.alibaba-inc.com/xcode/jdk11/codereview/5856676
ZhaiMo15 added a commit to kuaishou-syslab/dragonwell17 that referenced this pull request Jun 26, 2023
Summary:
- ThreadLocal Preempt
Support coroutine preempt base on thread-local
handshake rather than global safepoint.
- Fix lost unpark in lazySet
dragonwell-project/dragonwell8_jdk#63
- Add container info in jstack output
https://github.com/alibaba/dragonwell8_hotspot/pull/96/files
- Add support for thread ids in root container
dragonwell-project/dragonwell8_jdk#62

Test Plan: wisp rcm tests
ZhaiMo15 added a commit to kuaishou-syslab/dragonwell17 that referenced this pull request Aug 29, 2023
Summary:
- ThreadLocal Preempt
Support coroutine preempt base on thread-local
handshake rather than global safepoint.
- Fix lost unpark in lazySet
dragonwell-project/dragonwell8_jdk#63
- Add container info in jstack output
https://github.com/alibaba/dragonwell8_hotspot/pull/96/files
- Add support for thread ids in root container
dragonwell-project/dragonwell8_jdk#62

Test Plan: wisp rcm tests

Reviewed-by: yulei

Issue:
dragonwell-project#144
yuleil pushed a commit to dragonwell-project/dragonwell17 that referenced this pull request Aug 30, 2023
Summary:
- ThreadLocal Preempt
Support coroutine preempt base on thread-local
handshake rather than global safepoint.
- Fix lost unpark in lazySet
dragonwell-project/dragonwell8_jdk#63
- Add container info in jstack output
https://github.com/alibaba/dragonwell8_hotspot/pull/96/files
- Add support for thread ids in root container
dragonwell-project/dragonwell8_jdk#62

Test Plan: wisp rcm tests

Reviewed-by: yulei

Issue:
#144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants