[concurrency-interest] padding in Exchanger

Ruslan Cheremin cheremin at gmail.com
Tue Jan 17 07:47:58 EST 2012


Yes, I understand. I do not understand why -- in current conditions --
128 bytes padding is better then 64 bytes one. Both are not
bulletproof, and 64 bytes seems to be enough for arch with 64 cache
line...

Memory is cheap, but cache memory is still expensive.

2012/1/17 Doug Lea <dl at cs.oswego.edu>:
> On 01/17/12 07:28, Ruslan Cheremin wrote:
>
>> . From my point of view one side padding is not
>> bulletproof anyway...
>
>
> Yes. As a practical matter though, until an @Contended attribute
> or something like it is supported across JVMS (see list archives for
> discussion), you cannot arrange reliable two-sided padding
> for objects with mixed field types (ints, longs, refs that may be
> either 32 or 64 bits, etc), so one-sided is the best you can do.
>
>
> -Doug
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest


More information about the Concurrency-interest mailing list