Skip to content

Commit

Permalink
8244376: possibly stale comment above "struct SharedGlobals" in synch…
Browse files Browse the repository at this point in the history
…ronizer.cpp

Reviewed-by: hseigel, dholmes
  • Loading branch information
Daniel D. Daugherty committed Nov 16, 2020
1 parent c85c9ad commit 1d7ed03
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/hotspot/share/runtime/synchronizer.cpp
Expand Up @@ -720,24 +720,6 @@ void ObjectSynchronizer::notifyall(Handle obj, TRAPS) {

// -----------------------------------------------------------------------------
// Hash Code handling
//
// Performance concern:
// OrderAccess::storestore() calls release() which at one time stored 0
// into the global volatile OrderAccess::dummy variable. This store was
// unnecessary for correctness. Many threads storing into a common location
// causes considerable cache migration or "sloshing" on large SMP systems.
// As such, I avoided using OrderAccess::storestore(). In some cases
// OrderAccess::fence() -- which incurs local latency on the executing
// processor -- is a better choice as it scales on SMP systems.
//
// See http://blogs.oracle.com/dave/entry/biased_locking_in_hotspot for
// a discussion of coherency costs. Note that all our current reference
// platforms provide strong ST-ST order, so the issue is moot on IA32,
// x64, and SPARC.
//
// As a general policy we use "volatile" to control compiler-based reordering
// and explicit fences (barriers) to control for architectural reordering
// performed by the CPU(s) or platform.

struct SharedGlobals {
char _pad_prefix[OM_CACHE_LINE_SIZE];
Expand Down

1 comment on commit 1d7ed03

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.