mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baokun Li <libaokun@linux.alibaba.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
	brauner@kernel.org, tj@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] writeback: drop now-unnecessary rcu_barrier() in cgroup_writeback_umount()
Date: Wed, 20 May 2026 19:38:12 +0800	[thread overview]
Message-ID: <fb678612-84cb-4b24-8e8b-1403ff1c26fa@linux.alibaba.com> (raw)
In-Reply-To: <loqxahkvp7givyu2uyngsah3blxegywjbslj7cay27nnut3z7s@zybn6vft6az7>

On 2026/5/20 16:46, Jan Kara wrote:
> On Mon 18-05-26 21:53:48, Baokun Li wrote:
>> Commit e1b849cfa6b6 ("writeback: Avoid contention on wb->list_lock when
>> switching inodes") replaced the queue_rcu_work() based scheduling of
>> inode wb switches with a plain queue_work().  Since then no switcher
>> goes through call_rcu(), so rcu_barrier() in cgroup_writeback_umount()
>> has no callbacks of its own to wait for.  It still drains unrelated
>> call_rcu() callbacks from other subsystems on busy systems, which
>> incidentally slows umount down; drop it.
>>
>> Fixes: e1b849cfa6b6 ("writeback: Avoid contention on wb->list_lock when switching inodes")
>> Signed-off-by: Baokun Li <libaokun@linux.alibaba.com>
> I've already replied to previous version but anyway: feel free to add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
>
> 								Honza


Hi Honza,

Thank you for your review!

Sorry for the rushed v3 — your Reviewed-by on v2 came in right after
I hit send, so I missed picking it up. I'll carry it forward in v4.


Thanks,
Baokun


>> ---
>>  fs/fs-writeback.c | 5 -----
>>  1 file changed, 5 deletions(-)
>>
>> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
>> index 6766de9f9d75..325a30cc35bf 100644
>> --- a/fs/fs-writeback.c
>> +++ b/fs/fs-writeback.c
>> @@ -1248,11 +1248,6 @@ void cgroup_writeback_umount(struct super_block *sb)
>>  		 * will then drain it.
>>  		 */
>>  		synchronize_rcu();
>> -		/*
>> -		 * Use rcu_barrier() to wait for all pending callbacks to
>> -		 * ensure that all in-flight wb switches are in the workqueue.
>> -		 */
>> -		rcu_barrier();
>>  		flush_workqueue(isw_wq);
>>  	}
>>  }
>> -- 
>> 2.43.7
>>


  reply	other threads:[~2026-05-20 11:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 13:53 [PATCH v3 0/3] writeback: fix race between cgroup_writeback_umount() and inode_switch_wbs() Baokun Li
2026-05-18 13:53 ` [PATCH v3 1/3] " Baokun Li
2026-05-18 13:53 ` [PATCH v3 2/3] writeback: drop now-unnecessary rcu_barrier() in cgroup_writeback_umount() Baokun Li
2026-05-20  8:46   ` Jan Kara
2026-05-20 11:38     ` Baokun Li [this message]
2026-05-18 13:53 ` [PATCH v3 3/3] writeback: use a per-sb counter to drain inode wb switches at umount Baokun Li
2026-05-19  6:33   ` Baokun Li
2026-05-20  8:57   ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb678612-84cb-4b24-8e8b-1403ff1c26fa@linux.alibaba.com \
    --to=libaokun@linux.alibaba.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®