lkml.org 
[lkml]   [2020]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] md: optimize barrier usage for Rmw atomic bitops
On Fri, Jan 31, 2020 at 8:43 AM Guoqing Jiang
<guoqing.jiang@cloud.ionos.com> wrote:
>
>
>
> On 1/29/20 7:14 PM, Davidlohr Bueso wrote:
> > For both set and clear_bit, we can avoid the unnecessary barrier
> > on non LL/SC architectures, such as x86. Instead, use the
> > smp_mb__{before,after}_atomic() calls.
> >
> > Signed-off-by: Davidlohr Bueso <dbueso@suse.de>

./scripts/checkpatch.pl reports the following:

=============== 8< =================
WARNING: memory barrier without comment
#81: FILE: drivers/md/md.c:2564:
+ smp_mb__before_atomic();

WARNING: memory barrier without comment
#112: FILE: drivers/md/raid5.c:367:
+ smp_mb__before_atomic();

WARNING: Missing Signed-off-by: line by nominal patch author
'Davidlohr Bueso <dave@stgolabs.net>'

total: 0 errors, 3 warnings, 42 lines checked
=============== 8< =================

Since we are on it, let's add comments for the barriers. Also, please
double check the email
is correct.

Thanks,
Song

\
 
 \ /
  Last update: 2020-02-04 01:26    [W:0.048 / U:1.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site