RFR: 8263551: Provide shared lock-free FIFO queue implementation [v3]

Man Cao manc at openjdk.java.net
Tue Mar 30 19:11:42 UTC 2021


On Tue, 30 Mar 2021 14:47:33 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Man Cao has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Changed to try_pop() and eliminated conditional critical section.
>
> src/hotspot/share/utilities/lockFreeQueue.hpp line 56:
> 
>> 54:   DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, sizeof(T*));
>> 55:   T* volatile _tail;
>> 56:   DEFINE_PAD_MINUS_SIZE(2, DEFAULT_CACHE_LINE_SIZE, sizeof(T*));
> 
> LockFreeQueue should probably document it's padding.  And maybe should not have the second (trailing) padding, but leave that to the specific usage.  The trailing padding in the original was consistent with the usage there.  Other uses might not need any trailing padding, or might need less.

Moved the padding.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2986



More information about the hotspot-gc-dev mailing list