RFR: JDK-8283674: Pad ObjectMonitor allocation size to cache line size

David Holmes dholmes at openjdk.java.net
Mon Mar 28 01:59:40 UTC 2022


On Fri, 25 Mar 2022 09:02:28 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> See discussion under [1].
> 
> Since the libc malloc allocator may place ObjectMonitor instances adjacent to each other, we should pad the size of ObjectMonitor to fill a whole cache line to prevent false sharing between adjacent OMs.
> 
> [1] https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2022-March/054187.html

Hi Thomas,

It would be nice to back this up with any kind of performance data showing that this is actually an issue in practice. How much memory do we waste by reinstating padding at this granularity?

Thanks,
David

-------------

PR: https://git.openjdk.java.net/jdk/pull/7955


More information about the hotspot-runtime-dev mailing list