[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: RFR(M): 8166970: Adapt mutex padding according to DEFAULT_CACHE_LINE_SIZE
From:       Coleen Phillimore <coleen.phillimore () oracle ! com>
Date:       2016-09-30 18:35:40
Message-ID: ebc9da24-1d1b-e225-c232-db0e70c27d44 () oracle ! com
[Download RAW message or body]


It looks okay to me.  I don't have a strong preference either way, since 
MonitorBase has only nonstatic data members, and enums.

Maybe Dan has an opinion?   I can sponsor it for you.

Thanks,
Coleen


On 9/30/16 12:28 PM, Thomas Stüfe wrote:
> Hi Martin,
>
> you do not have to do the subclassing just to find out the size of all
> members preceding _name. Just use offsetof():
>
> CACHE_LINE_PADDING = DEFAULT_CACHE_LINE_SIZE - offsetof(_name)
>
> ...Kind Regards, Thomas
>
>
> On Fri, Sep 30, 2016 at 5:48 PM, Doerr, Martin <martin.doerr@sap.com> wrote:
>
>> Hi,
>>
>> the current implementation of Monitor padding (mutex.cpp) assumes that
>> cache lines are 64 Bytes. There's a platform dependent define
>> "DEFAULT_CACHE_LINE_SIZE" available which can be used. Purpose of padding
>> is to avoid false sharing.
>>
>> My proposed change is here:
>> http://cr.openjdk.java.net/~mdoerr/8166970_mutex_padding/webrev.00/
>>
>> Please review. If will also need a sponsor.
>>
>> Thanks and best regards,
>> Martin
>>
>>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic