VarHandles & LMAX Disruptor

Doug Lea dl at cs.oswego.edu
Tue Aug 18 13:51:06 UTC 2015


On 08/18/2015 02:44 AM, John Rose wrote:
>
>> On Aug 7, 2015, at 1:55 PM, Vitaly Davidovich <vitalyd at gmail.com> wrote:
>> Yes, anything that touches array.length can induce false sharing -- I
>> mentioned this earlier in this thread :) :
>
> I don't see that this particular case is a big problem.

It is a big problem only in that uncontrollable circumstances
cause unlikely/infrequent but huge slowdowns on big NUMA servers.

And it's a hard problem in part because on average, these effects
don't happen. On average padding is a bad idea. So false-sharing
control is a black art. The best we can do for non-arrays is pointwise
use of @Contended in cases with known high probabilityXimpact factors.
As Aleksey mentioned, nothing similar seems to apply for arrays
until Panama/layouts makes progress. Until then, it seems that this
will be a known limitation.

-Doug



More information about the valhalla-dev mailing list