[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <843f5270-d715-4c98-b191-1c271eb418c5@gmail.com>
Date: Mon, 16 Dec 2024 19:13:39 +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 06/10] netfs: Remove redundant use of smp_rmb()
David Howells wrote:
> From: Zilin Guan <zilin@....edu.cn>
>
> The function netfs_unbuffered_write_iter_locked() in
> fs/netfs/direct_write.c contains an unnecessary smp_rmb() call after
> wait_on_bit(). Since wait_on_bit() already incorporates a memory barrier
> that ensures the flag update is visible before the function returns, the
> smp_rmb() provides no additional benefit and incurs unnecessary overhead.
>
> This patch removes the redundant barrier to simplify and optimize the code.
>
> Signed-off-by: Zilin Guan <zilin@....edu.cn>
> Signed-off-by: David Howells <dhowells@...hat.com>
> cc: Akira Yokosawa <akiyks@...il.com>
Reviewed-by: Akira Yokosawa <akiyks@...il.com>
> cc: Jeff Layton <jlayton@...nel.org>
> cc: netfs@...ts.linux.dev
> cc: linux-fsdevel@...r.kernel.org
> Link: https://lore.kernel.org/r/20241207021952.2978530-1-zilin@seu.edu.cn/
> ---
> fs/netfs/direct_write.c | 1 -
> 1 file changed, 1 deletion(-)
>
Powered by blists - more mailing lists