From: Matthew Wilcox <willy@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Regzbot (on behalf of Thorsten Leemhuis)"
<regressions@leemhuis.info>, Vlastimil Babka <vbabka@suse.cz>,
David Chen <david.chen@nutanix.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux regressions mailing list <regressions@lists.linux.dev>
Subject: Re: Linux regressions report for mainline [2023-02-11]
Date: Sun, 12 Feb 2023 04:18:15 +0000 [thread overview]
Message-ID: <Y+hohwykIsBD2082@casper.infradead.org> (raw)
In-Reply-To: <CAHk-=wiEJa-R50PTYPyAQDs02OAyK+Oqr67x5nxns=OKXCEf6A@mail.gmail.com>
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.
next prev parent reply other threads:[~2023-02-12 4:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 17:28 Regzbot (on behalf of Thorsten Leemhuis)
2023-02-11 21:39 ` Linus Torvalds
2023-02-11 22:31 ` Linus Torvalds
2023-02-12 4:07 ` Matthew Wilcox
2023-02-12 4:18 ` Matthew Wilcox [this message]
2023-02-12 0:40 ` Linus Torvalds
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=Y+hohwykIsBD2082@casper.infradead.org \
--to=willy@infradead.org \
--cc=david.chen@nutanix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
/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®