From: Vlastimil Babka <vbabka@suse.cz>
To: Harry Yoo <harry.yoo@oracle.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
linux-mm@kvack.org
Subject: Re: [PATCH] slab: Remove unnecessary call to compound_head() in alloc_from_pcs()
Date: Tue, 25 Nov 2025 14:13:57 +0100 [thread overview]
Message-ID: <ecd8d2ae-e764-42da-b883-5c5495eef388@suse.cz> (raw)
In-Reply-To: <aSSuf5OG41sOGryI@hyeyoo>
On 11/24/25 20:14, Harry Yoo wrote:
> On Mon, Nov 24, 2025 at 02:23:27PM +0000, Matthew Wilcox (Oracle) wrote:
>> Each page knows which node it belongs to, so there's no need to
>> convert to a folio.
>>
>> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
>> ---
>
> Nice observation!
>
> Looks good to me,
> Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Thanks, added.
>
>> mm/slub.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/slub.c b/mm/slub.c
>> index e4a02586dacf..e6a330e24145 100644
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -5126,7 +5126,7 @@ void *alloc_from_pcs(struct kmem_cache *s, gfp_t gfp, int node)
>> * be false because of cpu migration during an unlocked part of
>> * the current allocation or previous freeing process.
>> */
>> - if (folio_nid(virt_to_folio(object)) != node) {
>> + if (page_to_nid(virt_to_page(object)) != node) {
>> local_unlock(&s->cpu_sheaves->lock);
>> return NULL;
>> }
>> --
>> 2.47.2
>>
>
prev parent reply other threads:[~2025-11-25 13:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 14:23 Matthew Wilcox (Oracle)
2025-11-24 19:14 ` Harry Yoo
2025-11-25 13:13 ` Vlastimil Babka [this message]
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=ecd8d2ae-e764-42da-b883-5c5495eef388@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=harry.yoo@oracle.com \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--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