RFR (M) #5 CR 8003985: Support @Contended annotation
Vitaly Davidovich
vitalyd at gmail.com
Fri Jan 11 14:31:31 PST 2013
Yes I understand the issue, and I need to check this, but I'd hope the OS
and/or CPU would report the proper coherence unit. Most use cases for
querying this info actually cares about the coherence unit size, so if they
under report the size then those query capabilities are of almost no value
(knowing that a line is 64 bytes isn't that interesting if CPU always
fetches two of them). So my point was that I'd think it's possible to get
this info without hard coding and erring on the high side.
Thanks
Sent from my phone
On Jan 11, 2013 4:50 PM, "Doug Lea" <dl at cs.oswego.edu> wrote:
>
> On 01/11/2013 05:14 PM, Vitaly Davidovich wrote:
>>
>
> 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.
>>>
>>
> In case it helps resolve this a bit:
>
> The logistic problem is that we do not know a way to
> reliably compute the effective cacheline length given
> the possibility (and these days, likelihood) of adjacent
> prefetching or other memory system quirks. And unreliable
> detection is worse than no detection. So, in the near
> term, the only course of action is to set this up using
> reasonable defaults, and improve them over time.
> Which is what Aleksey did.
>
> -Doug
>
>
More information about the hotspot-dev
mailing list