mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harry Yoo <harry@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: Vlastimil Babka <vbabka@kernel.org>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
	 David Rientjes <rientjes@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	 David Hildenbrand <david@kernel.org>,
	Gregory Price <gourry@gourry.net>, Zi Yan <ziy@nvidia.com>,
	 Joshua Hahn <joshua.hahnjy@gmail.com>,
	Rakie Kim <rakie.kim@sk.com>,
	 Ying Huang <ying.huang@linux.alibaba.com>,
	Jan Kara <jack@suse.cz>, Quan Liu <qualiu@nvidia.com>,
	 Lee Trager <ltrager@nvidia.com>,
	Seth Forshee <sforshee@nvidia.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/slub: Respect MPOL_BIND when taking remote partial slabs
Date: Wed, 25 Nov 2026 15:08:12 +0000	[thread overview]
Message-ID: <awbyHcZjHYvOizeI@thinkstation> (raw)
In-Reply-To: <20261119160430.1113397-1-arighi@nvidia.com>

On Thu, Nov 19, 2026 at 05:04:30PM +0100, Andrea Righi wrote:
> When the local node has no partial slabs, get_from_any_partial() and
> __refill_objects_any() take partial slabs from other nodes.

There's a tradeoff between memory usage and NUMA locality and the
kernel by default favours reducing memory usage.

This could be tuned by /sys/kernel/slab/<name>/remote_node_defrag_ratio.

> The scan
> only checks cpuset_zone_allowed(), not the task's mempolicy, so a task
> bound to a node with MPOL_BIND can get objects from nodes outside its
> policy, even though new slabs for it are allocated on the allowed nodes.
>
> slab_strict_numa doesn't help here: when the local node is in the bind
> mask, apply_strict_numa_policy() leaves the node as NUMA_NO_NODE and the
> allocation takes the same path.

This sounds like an issue to be fixed in slab_strict_numa?
NUMA_NO_NODE allocations should still honour the mempolicy, no?

-- 
Cheers,
Harry / Hyeonggon

      parent reply	other threads:[~2026-11-25 15:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 16:04 Andrea Righi
2026-11-20 16:27 ` Gregory Price (Meta)
2026-11-25 15:08 ` Harry Yoo [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=awbyHcZjHYvOizeI@thinkstation \
    --to=harry@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arighi@nvidia.com \
    --cc=cl@gentwo.org \
    --cc=david@kernel.org \
    --cc=gourry@gourry.net \
    --cc=hao.li@linux.dev \
    --cc=jack@suse.cz \
    --cc=joshua.hahnjy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ltrager@nvidia.com \
    --cc=qualiu@nvidia.com \
    --cc=rakie.kim@sk.com \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=sforshee@nvidia.com \
    --cc=vbabka@kernel.org \
    --cc=ying.huang@linux.alibaba.com \
    --cc=ziy@nvidia.com \
    /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®