You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/02/26 09:07:00 UTC
[jira] [Commented] (ARTEMIS-1702) ConcurrentLongHashMap and
ConcurrentLongHashSet should avoid volatile set cost on put/remove
[ https://issues.apache.org/jira/browse/ARTEMIS-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16376559#comment-16376559 ]
ASF GitHub Bot commented on ARTEMIS-1702:
-----------------------------------------
GitHub user franz1981 opened a pull request:
https://github.com/apache/activemq-artemis/pull/1895
ARTEMIS-1702 ConcurrentLongHashMap and ConcurrentLongHashSet should avoid volatile set cost on put/remove
Most of the visibility guarantees of size/capacity fields modifications are already provided through optimistic locking, hence it could be used it instead of volatile set(s) on put/remove, making those methods more efficient.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/franz1981/activemq-artemis concurrent_long_hash_map_set_no_barriers
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/1895.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1895
----
commit cab7ece2339c2696bedab28e6111cfac2f347b97
Author: Francesco Nigro <ni...@...>
Date: 2018-02-26T09:05:02Z
ARTEMIS-1702 ConcurrentLongHashMap and ConcurrentLongHashSet should avoid volatile set cost on put/remove
Most of the visibility guarantees of size/capacity fields modifications are already provided through optimistic locking, hence it could be used it instead of volatile set(s) on put/remove, making those methods more efficient.
----
> ConcurrentLongHashMap and ConcurrentLongHashSet should avoid volatile set cost on put/remove
> --------------------------------------------------------------------------------------------
>
> Key: ARTEMIS-1702
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1702
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 2.5.0
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Minor
> Fix For: 2.5.0
>
>
> ConcurrentLongHashSet/HashMap are making use of unecessary volatile store of size/capacity for modifier methods.
> The current JVM implementation of volatile store for multicore x86 is making use of a StoreLoad barrier for this operation: the most expensive one.
> These volatile stores could be replaced by plain stores/lazySet ones with no effects on the correctness of those methods.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)