linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Christoph Lameter (Ampere)" <cl@gentwo.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
	linux-mm@kvack.org,  Vlastimil Babka <vbabka@suse.cz>,
	 Andrew Morton <akpm@linux-foundation.org>,
	 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 09:12:06 -0800 (PST)	[thread overview]
Message-ID: <9b609df3-b4af-e0fa-dcbe-1358cd317194@gentwo.org> (raw)
In-Reply-To: <ZetFrixmULTtjPCK@casper.infradead.org>


> On Fri, Mar 08, 2024 at 11:27:32AM -0500, Kent Overstreet wrote:
>> On Fri, Mar 08, 2024 at 02:58:48PM +0000, Matthew Wilcox wrote:
>>> There are potentiually better uses for those bits.  We could turn
>>> folio_test_slab() into a PageType test, freeing up a page flag.
>>
>> They overlap _mapcount, did you figure out how to use that for a
>> PageType enum?
>
> In 2018 ... 6e292b9be7f4358985ce33ae1f59ab30a8c09e08
>

This seems to be 32 bit field. We could segment that into two unsigned 
shorts. In fact any operation on a slab larger than 2xPAGE_SIZE is 
directly turned into a page allocator call bypassing slub. So you only 
need 0 ... 2 * PAGE_SIZE for the range of the int.



  reply	other threads:[~2024-03-08 17:12 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
2024-03-08 16:27       ` Kent Overstreet
2024-03-08 17:06         ` Matthew Wilcox
2024-03-08 17:12           ` Christoph Lameter (Ampere) [this message]
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=9b609df3-b4af-e0fa-dcbe-1358cd317194@gentwo.org \
    --to=cl@gentwo.org \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --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 \
    --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