[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y+hohwykIsBD2082@casper.infradead.org>
Date: Sun, 12 Feb 2023 04:18:15 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: "Regzbot (on behalf of Thorsten Leemhuis)"
<regressions@...mhuis.info>, Vlastimil Babka <vbabka@...e.cz>,
David Chen <david.chen@...anix.com>,
LKML <linux-kernel@...r.kernel.org>,
Linux regressions mailing list <regressions@...ts.linux.dev>
Subject: Re: Linux regressions report for mainline [2023-02-11]
On Sat, Feb 11, 2023 at 01:39:08PM -0800, Linus Torvalds wrote:
> Maybe we should just bite the bullet and say "page cache pages are
> rcu-freed after removing them from the mapping", so that we don't need
> the whole folio_try_get_rcu() at all.
For GUP, you'd also have to do it for any page which has ever been mapped
to userspace, including from drivers. I think that gets a bit tricky.
But there's a good motivation for RCU-freeing page cache pages.
Ben Lahaise once worked on a system which did very small reads which
invariably hit in the page cache. On the order of dozens to hundreds
of bytes. For that workload, cache contention on the page refcount was
the limiting factor on performance. He had an optimisation where he'd
look up the page, memcpy() to a small buffer on the stack, look up the
page again, and if it was the same, copy_to_user(). I was thinking that
we could do that less painfully by RCU-freeing pages.
That's at the back of my mind; I'm kind of busy with other things
right now.
Powered by blists - more mailing lists