# HG changeset patch # User qpzhang # Date 1592320518 -28800 # Tue Jun 16 23:15:18 2020 +0800 # Node ID b0ffda66e0c2c3883794be01a3f73c7562836c3e # Parent 01a72829dcffb87f676d81ddd937d7069e27b24b 8248214: Add paddings for TaskQueueSuper to reduce false-sharing cache contention Summary: Add paddings for TaskQueueSuper to reduce false-sharing cache contention Reviewed-by: robm diff --git a/src/hotspot/share/gc/shared/taskqueue.hpp b/src/hotspot/share/gc/shared/taskqueue.hpp --- a/src/hotspot/share/gc/shared/taskqueue.hpp +++ b/src/hotspot/share/gc/shared/taskqueue.hpp @@ -149,6 +149,8 @@ }; }; + // Add paddings to reduce false-sharing cache contention between _bottom and _age + DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, sizeof(_bottom)); volatile Age _age; // These both operate mod N.