RFR (M) #5 CR 8003985: Support @Contended annotation

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Jan 11 13:38:52 PST 2013


On 01/11/2013 05:14 PM, Vitaly Davidovich wrote:
> What interaction with the prefetcher are you concerned about?

We are going in circles on this. Adjacent cache line prefetchers acquire
the ownership for the consecutive cache line. That makes the padding
with single cache line not sufficient, and requires at least two.
There's no clear way to deal with this, and so we bail out at this point
for the pessimistic estimate.

> I still think it would be better to get line size from OS (or CPU)
> rather than hardcoding a default - this seems orthogonal to the
> prefetcher issue since the default you picked is probably going to be
> either the same size or larger than what os/CPU would've reported.

This is an interesting debate, and, again, I don't want to have it in
the course of this changeset. This debate requires research. This debate
requires experiments. This debate requires running on multitude of
platforms. Not to mention that the code messing with MSRs trying to
figure out the absence of hardware prefetchers on all CPUs is comparable
in size with the classloader changes in this patch.

We know pessimistic estimate works in all cases we care about. Please
let the *infrastructure code* to be committed into mainline to actually
*enable* us to do further research. When jsr166 code migrates to use
@Contended, you will have the perfect testbed to drive the "let's
optimize @Contended footprint" rally, when you will have the performance
tests backing up that work.

-Aleksey.

P.S. I'm continuously surprised on people wanting to fix everything at
once. Argh.



More information about the hotspot-dev mailing list