mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6973570: OrderAccess::storestore() scales poorly on multi-socket x64 and sparc: cache-line ping-ponging
Volatile store to static variable removed in favour of a volatile store to stack to avoid excessive cache coherency traffic; verified that the volatile store is not elided by any of our current compilers. Reviewed-by: dholmes, dice, jcoomes, kvn
This commit is contained in:
parent
b0e98512a7
commit
7ee29eeb6a
7 changed files with 33 additions and 27 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. 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
|
||||
|
@ -166,6 +166,12 @@
|
|||
// and release must include a sequence point, usually via a volatile memory
|
||||
// access. Other ways to guarantee a sequence point are, e.g., use of
|
||||
// indirect calls and linux's __asm__ volatile.
|
||||
// Note: as of 6973570, we have replaced the originally static "dummy" field
|
||||
// (see above) by a volatile store to the stack. All of the versions of the
|
||||
// compilers that we currently use (SunStudio, gcc and VC++) respect the
|
||||
// semantics of volatile here. If you build HotSpot using other
|
||||
// compilers, you may need to verify that no compiler reordering occurs
|
||||
// across the sequence point respresented by the volatile access.
|
||||
//
|
||||
//
|
||||
// os::is_MP Considered Redundant
|
||||
|
@ -297,10 +303,6 @@ class OrderAccess : AllStatic {
|
|||
static void release_store_ptr_fence(volatile intptr_t* p, intptr_t v);
|
||||
static void release_store_ptr_fence(volatile void* p, void* v);
|
||||
|
||||
// In order to force a memory access, implementations may
|
||||
// need a volatile externally visible dummy variable.
|
||||
static volatile intptr_t dummy;
|
||||
|
||||
private:
|
||||
// This is a helper that invokes the StubRoutines::fence_entry()
|
||||
// routine if it exists, It should only be used by platforms that
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue