lkml.org 
[lkml]   [2021]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [tip: locking/urgent] locking/ww_mutex: Simplify use_ww_ctx & ww_ctx handling
From
Date
On 3/17/21 9:55 AM, Peter Zijlstra wrote:
> On Wed, Mar 17, 2021 at 09:43:20AM -0400, Waiman Long wrote:
>
>> Using gcc 8.4.1, the generated __mutex_lock function has the same size (with
>> last instruction at offset +5179) with or without this patch. Well, you can
>> say that this patch is an no-op wrt generated code.
> OK, then GCC has gotten better. Because back then I tried really hard
> but it wouldn't remove the if (ww_ctx) branches unless I had that extra
> const bool argument.
>
I think ww_mutex was merged in 2013. That is almost 8 years ago. It
could still be the case that older gcc compilers may not generate the
right code. I will try the RHEL7 gcc compiler (4.8.5) to see how it fares.

Cheers,
Longman

\
 
 \ /
  Last update: 2021-03-17 15:11    [W:0.134 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site