comparison src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp @ 1711:a6bff45449bc

6973570: OrderAccess::storestore() scales poorly on multi-socket x64 and sparc: cache-line ping-ponging Summary: 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
author ysr
date Tue, 10 Aug 2010 14:53:35 -0700
parents c18cbe5936b8
children f95d63e2154a
comparison
equal deleted inserted replaced
1710:94251661de76 1711:a6bff45449bc
1 /* 1 /*
2 * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
34 inline void OrderAccess::acquire() { 34 inline void OrderAccess::acquire() {
35 __asm__ volatile ("nop" : : :); 35 __asm__ volatile ("nop" : : :);
36 } 36 }
37 37
38 inline void OrderAccess::release() { 38 inline void OrderAccess::release() {
39 jint* dummy = (jint*)&dummy; 39 jint* local_dummy = (jint*)&local_dummy;
40 __asm__ volatile("stw %%g0, [%0]" : : "r" (dummy) : "memory"); 40 __asm__ volatile("stw %%g0, [%0]" : : "r" (local_dummy) : "memory");
41 } 41 }
42 42
43 inline void OrderAccess::fence() { 43 inline void OrderAccess::fence() {
44 __asm__ volatile ("membar #StoreLoad" : : :); 44 __asm__ volatile ("membar #StoreLoad" : : :);
45 } 45 }