[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <27fff669-bec4-4255-ba2f-4b154b474d97@gmail.com>
Date: Sat, 14 Dec 2024 19:16:18 +0900
From: Akira Yokosawa <akiyks@...il.com>
To: David Howells <dhowells@...hat.com>,
Christian Brauner <christian@...uner.io>
Cc: Max Kellermann <max.kellermann@...os.com>,
Ilya Dryomov <idryomov@...il.com>, Xiubo Li <xiubli@...hat.com>,
Trond Myklebust <trondmy@...nel.org>, Jeff Layton <jlayton@...nel.org>,
Matthew Wilcox <willy@...radead.org>, netfs@...ts.linux.dev,
linux-afs@...ts.infradead.org, linux-cifs@...r.kernel.org,
linux-nfs@...r.kernel.org, ceph-devel@...r.kernel.org, v9fs@...ts.linux.dev,
linux-erofs@...ts.ozlabs.org, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Zilin Guan <zilin@....edu.cn>, Akira Yokosawa <akiyks@...il.com>
Subject: Re: [PATCH 07/10] netfs: Fix missing barriers by using
clear_and_wake_up_bit()
Hi David,
David Howells wrote:
> Use clear_and_wake_up_bit() rather than something like:
>
> clear_bit_unlock(NETFS_RREQ_IN_PROGRESS, &rreq->flags);
> wake_up_bit(&rreq->flags, NETFS_RREQ_IN_PROGRESS);
>
> as there needs to be a barrier inserted between which is present in
> clear_and_wake_up_bit().
If I am reading the kernel-doc comment of clear_bit_unlock() [1, 2]:
This operation is atomic and provides release barrier semantics.
correctly, there already seems to be a barrier which should be
good enough.
[1]: https://www.kernel.org/doc/html/latest/core-api/kernel-api.html#c.clear_bit_unlock
[2]: include/asm-generic/bitops/instrumented-lock.h
>
> Fixes: 288ace2f57c9 ("netfs: New writeback implementation")
> Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading")
So I'm not sure this fixes anything.
What am I missing?
Thanks, Akira
> Signed-off-by: David Howells <dhowells@...hat.com>
> cc: Zilin Guan <zilin@....edu.cn>
> cc: Akira Yokosawa <akiyks@...il.com>
> cc: Jeff Layton <jlayton@...nel.org>
> cc: netfs@...ts.linux.dev
> cc: linux-fsdevel@...r.kernel.org
> ---
> fs/netfs/read_collect.c | 3 +--
> fs/netfs/write_collect.c | 9 +++------
> 2 files changed, 4 insertions(+), 8 deletions(-)
>
[...]
Powered by blists - more mailing lists