mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gregory Price (Meta)" <gourry@gourry.net>
To: Andrea Righi <arighi@nvidia.com>
Cc: Jan Kara <jack@suse.cz>, Alexander Viro <viro@zeniv.linux.org.uk>,
	 Christian Brauner <brauner@kernel.org>,
	Quan Liu <qualiu@nvidia.com>,  Lee Trager <ltrager@nvidia.com>,
	Seth Forshee <sforshee@nvidia.com>,
	 Vlastimil Babka <vbabka@kernel.org>,
	Gregory Price <gourry@gourry.net>,
	 linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-mm@kvack.org
Subject: Re: [PATCH] pipe: Prefer mempolicy node for metadata allocations
Date: Thu, 19 Nov 2026 10:54:11 -0500	[thread overview]
Message-ID: <179510365141.412063.5548407366346393690.b4-reply@b4> (raw)
In-Reply-To: <avQP1aXhe7nQuzt9@gpd4>

On 2026-11-11 07:48 +0100, Andrea Righi wrote:
> 
> Vlastimil, Gregory, do you think this SLUB locality and mempolicy
> aspects makes sense here? In particular, does preferring the policy node
> for slab-sized pipe metadata, while retaining the policy-aware path for
> larger arrays, look reasonable?
> 

Funny enough I was leaning toward task mempolicy being ignored for
non-__GFP_ACCOUNT allocations but SLAB_ACCOUNT makes this a bit
complicated.  This would be another scenario I have to consider.

(related but not directly problematic with the change here)
https://lore.kernel.org/all/20260701222112.2820098-1-gourry@gourry.net/

As a rule I generally think depending on userland mempolicy
to direct kernel memory placement is fragile and unreliable,
but your results are interesting.

General notes - I dislike direct current->mempolicy access in
random places in MM, and dislike any MPOL mode checking outside
mempolicy.c - but sometimes it's necessary.

I'm not against slab having better numa awareness, it makes sense
you'd want to prefer the metadata to live close as well.

Give me a bit more time to wrap my head around this, sorry for the
delayed reply, things have been a bit chaotic this past month.

-- 
~Gregory


  parent reply	other threads:[~2026-11-19 15:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  6:52 Andrea Righi
2026-11-10 12:27 ` Jan Kara
2026-11-11  6:48   ` Andrea Righi
2026-11-11  8:12     ` Vlastimil Babka (SUSE)
2026-11-18 13:44       ` Andrea Righi
2026-11-18 14:24         ` Vlastimil Babka (SUSE)
2026-11-19 15:54     ` Gregory Price (Meta) [this message]
2026-11-19 16:11       ` Andrea Righi

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=179510365141.412063.5548407366346393690.b4-reply@b4 \
    --to=gourry@gourry.net \
    --cc=arighi@nvidia.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ltrager@nvidia.com \
    --cc=qualiu@nvidia.com \
    --cc=sforshee@nvidia.com \
    --cc=vbabka@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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®