From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Zqiang <qiang.zhang1211@gmail.com>,
hch@infradead.org, akpm@linux-foundation.org,
sunhao.th@gmail.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Mikulas Patocka <mpatocka@redhat.com>,
Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] mm: backing-dev: use kfree_rcu() instead of synchronize_rcu_expedited()
Date: Fri, 15 Oct 2021 06:19:18 -0700 [thread overview]
Message-ID: <YWl/1gI+O2+PnKhz@infradead.org> (raw)
In-Reply-To: <YWl1rDO6gCFJE4hp@casper.infradead.org>
On Fri, Oct 15, 2021 at 01:35:56PM +0100, Matthew Wilcox wrote:
> struct backing_dev_info {
> u64 id;
> - struct rb_node rb_node; /* keyed by ->id */
> + union {
> + struct rb_node rb_node; /* keyed by ->id */
> + struct rcu_head rcu;
> + };
> struct list_head bdi_list;
> unsigned long ra_pages; /* max readahead in PAGE_SIZE units */
> unsigned long io_pages; /* max allowed IO size */
>
>
> Christoph, independent of the inode lifetime problem, this actually seems
> like a good approach to take. I don't see why we should synchronize_rcu()
> here? Adding Jens (original introducer of the synchronize_rcu()), Mikulas
> (converted it to use _expedited) and Tejun (worked around a problem when
> using _expedited).
The kfree+rcu + your suggestion does seem like a good idea in general to
me. But I'd still like to fix the actual bug being reported before
optimizing the area in a way that papers over the bug.
next prev parent reply other threads:[~2021-10-15 13:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 8:24 Zqiang
2021-10-14 11:24 ` Matthew Wilcox
2021-10-15 2:57 ` Qiang Zhang
2021-10-15 3:34 ` Qiang Zhang
2021-10-15 5:06 ` Zqiang
2021-10-15 12:35 ` Matthew Wilcox
2021-10-15 13:19 ` Christoph Hellwig [this message]
2021-10-18 2:15 ` Zqiang
2021-10-15 3:39 ` zhangqiang
2021-10-14 12:06 ` Christoph Hellwig
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=YWl/1gI+O2+PnKhz@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpatocka@redhat.com \
--cc=qiang.zhang1211@gmail.com \
--cc=sunhao.th@gmail.com \
--cc=tj@kernel.org \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox