[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d0d89b2b-dbb8-cb07-f5e6-bee9413c971a@huawei.com>
Date: Mon, 22 Jan 2024 20:25:56 +0800
From: Baokun Li <libaokun1@...wei.com>
To: Christian Brauner <brauner@...nel.org>
CC: <torvalds@...ux-foundation.org>, <viro@...iv.linux.org.uk>,
<jack@...e.cz>, <willy@...radead.org>, <akpm@...ux-foundation.org>,
<linux-kernel@...r.kernel.org>, <yi.zhang@...wei.com>,
<yangerkun@...wei.com>, <yukuai3@...wei.com>,
<linux-fsdevel@...r.kernel.org>, Baokun Li <libaokun1@...wei.com>
Subject: Re: [PATCH 0/2] fs: make the i_size_read/write helpers be
smp_load_acquire/store_release()
On 2024/1/22 19:14, Christian Brauner wrote:
> On Mon, 22 Jan 2024 17:45:34 +0800, Baokun Li wrote:
>> This patchset follows the linus suggestion to make the i_size_read/write
>> helpers be smp_load_acquire/store_release(), after which the extra smp_rmb
>> in filemap_read() is no longer needed, so it is removed.
>>
>> Functional tests were performed and no new problems were found.
>>
>> Here are the results of unixbench tests based on 6.7.0-next-20240118 on
>> arm64, with some degradation in single-threading and some optimization in
>> multi-threading, but overall the impact is not significant.
>>
>> [...]
> Hm, we can certainly try but I wouldn't rule it out that someone will
> complain aobut the "non-significant" degradation in single-threading.
> We'll see. Let that performance bot chew on it for a bit as well.
>
> But I agree that the smp_load_acquire()/smp_store_release() is clearer
> than the open-coded smp_rmb().
Thank you very much for applying this patch!
Adding barriers where none existed does introduce some performance
degradation. But the multi-threaded test results here look pretty
good, it's just that the single-threaded test results have a bit too
much degradation for Shell Scripts (8 concurrent). I've tracked
down this test item, which calls clone() and wait4() and then triggers
isize reads and writes frequently, so the degradation here is as
expected, just not sure if anyone cares about this scenario.
> ---
>
> Applied to the vfs.misc branch of the vfs/vfs.git tree.
> Patches in the vfs.misc branch should appear in linux-next soon.
>
> Please report any outstanding bugs that were missed during review in a
> new review to the original patch series allowing us to drop it.
>
> It's encouraged to provide Acked-bys and Reviewed-bys even though the
> patch has now been applied. If possible patch trailers will be updated.
>
> Note that commit hashes shown below are subject to change due to rebase,
> trailer updates or similar. If in doubt, please check the listed branch.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
> branch: vfs.misc
>
> [1/2] fs: make the i_size_read/write helpers be smp_load_acquire/store_release()
> https://git.kernel.org/vfs/vfs/c/7d7825fde8ba
> [2/2] Revert "mm/filemap: avoid buffered read/write race to read inconsistent data"
> https://git.kernel.org/vfs/vfs/c/83dfed690b90
Thanks!
--
With Best Regards,
Baokun Li
.
Powered by blists - more mailing lists