lkml.org 
[lkml]   [2019]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 15/16] locking/rwsem: Merge owner into count on x86-64
From
Date
On 04/18/2019 10:28 AM, Peter Zijlstra wrote:
> On Sat, Apr 13, 2019 at 01:22:58PM -0400, Waiman Long wrote:
>> +#ifdef CONFIG_X86_64
>> +#define RWSEM_MERGE_OWNER_TO_COUNT
>> +#endif
>> +#ifdef RWSEM_MERGE_OWNER_TO_COUNT
>> +
>> +#ifdef __PHYSICAL_MASK_SHIFT
>> +#define RWSEM_PA_MASK_SHIFT __PHYSICAL_MASK_SHIFT
>> +#else
>> +#define RWSEM_PA_MASK_SHIFT 52
>> +#endif
> I really dislike how this hardcodes x86_64.
>
> It would be much better to have a CONFIG variable that gives us the
> PA_BITS. Then all an architecture needs to do is set that right.
>
> FWIW:
>
> arch/arm64/Kconfig:config ARM64_PA_BITS_48
> arch/arm64/Kconfig:config ARM64_PA_BITS_52
>
> So ARM64 could also use this -- provided we get that overflow thing
> sorted.

That will work too. I just a bit hesitant to add new config variable.

Cheers,
Longman

\
 
 \ /
  Last update: 2019-04-18 16:41    [W:0.139 / U:3.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site