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

Implement and map nqp::attrinited, uncomment more of NQPHLL. #15

Merged
merged 3 commits into from Jun 10, 2013
Merged

Implement and map nqp::attrinited, uncomment more of NQPHLL. #15

merged 3 commits into from Jun 10, 2013

Conversation

zhuomingliang
Copy link
Member

No description provided.

@zhuomingliang
Copy link
Member Author

Hello @jnthn, I just pushed a new commit which implements is_attribute_initialized in P6opaque.

diakopter added a commit that referenced this pull request Jun 10, 2013
Implement and map nqp::attrinited, uncomment more of NQPHLL.
@diakopter diakopter merged commit fe831f9 into MoarVM:master Jun 10, 2013
@zhuomingliang zhuomingliang deleted the patch-2 branch June 11, 2013 00:54
FROGGS added a commit that referenced this pull request Nov 16, 2016
Issue #15.

The core issue is that AO_stack_pop_explicit_aux_acquire really needs
to ensure that the store to the blacklist via
AO_compare_and_swap_acquire becomes visible before the load to check
the list head.  This effectively needs store-load ordering.
Currently the only ordering here is imposed by the _acquire on the
compare_and_swap.  On PowerPC that turns into an lwsync, which is too
weak to enforce store to load ordering.

This patch should fix the issue.  But this is suboptimal on x86, and
we may want to make the fence conditional on "not x86", where the CAS
already includes sufficient ordering.  (With C++11 atomics, this would
also be tricky and probably involve making a bunch of accesses seq_cst.)

* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_pop_explicit_aux_acquire): Call AO_compare_and_swap instead
of AO_compare_and_swap_acquire; call AO_nop_full just before
(first != AO_load(list)).
ivmai/libatomic_ops@85dd735
Author: Hans Boehm <boehm@acm.org>
Date:   Mon Aug 15 11:32:33 2016 +0300
FROGGS added a commit that referenced this pull request Nov 16, 2016
Issue #15.

The core issue is that AO_stack_pop_explicit_aux_acquire really needs
to ensure that the store to the blacklist via
AO_compare_and_swap_acquire becomes visible before the load to check
the list head.  This effectively needs store-load ordering.
Currently the only ordering here is imposed by the _acquire on the
compare_and_swap.  On PowerPC that turns into an lwsync, which is too
weak to enforce store to load ordering.

This patch should fix the issue.  But this is suboptimal on x86, and
we may want to make the fence conditional on "not x86", where the CAS
already includes sufficient ordering.  (With C++11 atomics, this would
also be tricky and probably involve making a bunch of accesses seq_cst.)

* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_pop_explicit_aux_acquire): Call AO_compare_and_swap instead
of AO_compare_and_swap_acquire; call AO_nop_full just before
(first != AO_load(list)).
ivmai/libatomic_ops@85dd735
Author: Hans Boehm <boehm@acm.org>
Date:   Mon Aug 15 11:32:33 2016 +0300
@MasterDuke17 MasterDuke17 mentioned this pull request Dec 30, 2022
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.

None yet

2 participants