From: Matthew Wilcox <willy@infradead.org>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-mm@kvack.org, Vlastimil Babka <vbabka@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>
Subject: Re: [PATCH] mm/slub: Make __ksize() faster
Date: Fri, 8 Mar 2024 14:58:48 +0000 [thread overview]
Message-ID: <ZesnqFAlL-l-OnAO@casper.infradead.org> (raw)
In-Reply-To: <stdjjv76orbi75nzghuaowld7z3x7tdebbsu6rsqwzuki5hwv5@lauwogx6cn7y>
On Fri, Mar 08, 2024 at 12:16:09AM -0500, Kent Overstreet wrote:
> On Fri, Mar 08, 2024 at 04:48:11AM +0000, Matthew Wilcox wrote:
> > On Thu, Mar 07, 2024 at 10:13:22PM -0500, Kent Overstreet wrote:
> > > This steals it to make __ksize() faster; it's now a single dependent
> > > load, instead of two. This is going to be important for tracking the
> > > amount of memory stranded by RCU, which we want to be able to do if
> > > we're going to be freeing all pagecache folios (and perhaps all folios)
> > > via RCU.
> >
> > Do you have any measurements? I don't necessarily object, it's just
> > that I would have thought we were already bringing slab->slab_cache
> > into cache as part of the freeing operation.
>
> for kfree() yes, but for kfree_rcu() no - that'll happen significantly
> later.
>
> I don't have measurements that it /matters/, but since we have the u32
> there now this seems like a good use for it.
There are potentiually better uses for those bits. We could turn
folio_test_slab() into a PageType test, freeing up a page flag.
next prev parent reply other threads:[~2024-03-08 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 3:13 Kent Overstreet
2024-03-08 4:48 ` Matthew Wilcox
2024-03-08 5:16 ` Kent Overstreet
2024-03-08 14:58 ` Matthew Wilcox [this message]
2024-03-08 16:27 ` Kent Overstreet
2024-03-08 17:06 ` Matthew Wilcox
2024-03-08 17:12 ` Christoph Lameter (Ampere)
2024-03-08 18:26 ` Matthew Wilcox
2024-03-08 20:58 ` Kent Overstreet
2024-03-08 21:28 ` Christoph Lameter (Ampere)
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=ZesnqFAlL-l-OnAO@casper.infradead.org \
--to=willy@infradead.org \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--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