RFR: JDK-8283674: Pad ObjectMonitor allocation size to cache line size
Thomas Stuefe
stuefe at openjdk.java.net
Mon Mar 28 08:27:41 UTC 2022
On Mon, 28 Mar 2022 06:54:15 GMT, David Holmes <dholmes at openjdk.org> wrote:
> > If padding was necessary before, would it not be necessary now too?
>
> We don't know that it was _necessary_ before, only that it was present - the alignment aspect may have been more important than actual cache-line padding. If someone wanted to add padding anywhere today we would want performance numbers to show it is needed. So adding back padding that we have removed, and with which no performance regression has been attributed, should be held to the same standard IMO.
>
> Cheers, David
Hi David,
>From the conversation with Dan I had the impression that decisions like these were backed by lots of performance work at Oracle. Lets see what @dcubed-ojdk says. If he also thinks my patch unnecessary, I'll withdraw. I also try to do some simple benchmarks.
Cheers Thomas
(My personal opinion on this is that the memory costs are neglectable compared with the potential performance impact. A normal app has several thousand live OMs, so we are talking about 50-100k maybe? But you quoted the "thousand cuts" in another PR, and I understand your point)
-------------
PR: https://git.openjdk.java.net/jdk/pull/7955
More information about the hotspot-runtime-dev
mailing list