All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Jan Kara <jack@suse.cz>
Cc: Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] writeback: Avoid contention on wb->list_lock when switching inodes
Date: Fri, 12 Sep 2025 06:52:51 -1000	[thread overview]
Message-ID: <aMRP4zE3DM2FvG1N@slm.duckdns.org> (raw)
In-Reply-To: <2nhajeaf6gs3xcpk3jyua7qle7ltmtb4qr564pj4atb7ignofv@wopqday65jgr>

On Fri, Sep 12, 2025 at 06:39:28PM +0200, Jan Kara wrote:
> > Shouldn't this ref put at the end of the function?
> 
> It is put:
> 
> > > +	while (1) {
> > > +		list = llist_del_all(&new_wb->switch_wbs_ctxs);
> > > +		/* Nothing to do? */
> > > +		if (!list) {
> > > +			wb_put(new_wb);
> 			^^^^ here
> There's no other way how to exit the function... But I can put 'break' here
> and do wb_put() at the end of the function. That will likely be less
> subtle.

Ah, sorry about missing that. Yeah, maybe better to put it ouside the loop
to make it clearer.

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

  reply	other threads:[~2025-09-12 16:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-12 10:38 [PATCH v2 0/4] writeback: Avoid lockups when switching inodes Jan Kara
2025-09-12 10:38 ` [PATCH v2 1/4] writeback: Avoid contention on wb->list_lock " Jan Kara
2025-09-12 16:15   ` Tejun Heo
2025-09-12 16:39     ` Jan Kara
2025-09-12 16:52       ` Tejun Heo [this message]
2025-09-12 16:20   ` Tejun Heo
2025-09-12 10:38 ` [PATCH v2 2/4] writeback: Avoid softlockup when switching many inodes Jan Kara
2025-09-12 10:38 ` [PATCH v2 3/4] writeback: Avoid excessively long inode switching times Jan Kara
2025-09-12 10:38 ` [PATCH v2 4/4] writeback: Add tracepoint to track pending inode switches Jan Kara
2025-09-15 12:50 ` [PATCH v2 0/4] writeback: Avoid lockups when switching inodes Christian Brauner
2025-09-15 15:13   ` Jan Kara
2025-09-19 11:09     ` Christian Brauner

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=aMRP4zE3DM2FvG1N@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.