linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Christoph Lameter (Ampere)" <cl@gentwo.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	 Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org,  Johannes Weiner <hannes@cmpxchg.org>,
	Hyeonggon Yoo <42.hyeyoo@gmail.com>
Subject: Re: [PATCH v2 2/6] slub: Use alloc_pages_node() in alloc_slab_page()
Date: Wed, 10 Jul 2024 09:43:58 -0700 (PDT)	[thread overview]
Message-ID: <b9462180-b372-4793-77bc-8e70fbd0d304@gentwo.org> (raw)
In-Reply-To: <b316ac44-bb90-4157-b668-cbcc5d9e9646@suse.cz>

On Wed, 10 Jul 2024, Vlastimil Babka wrote:

>> With this patch cgroup restrictions memory policies etc etc no longer work
>> in the slab allocator.
>
> The only difference is memory policy from get_task_policy(), and the rest is
> the same, right?

There are also the cpuset/cgroup restrictions via the zonelists that are 
bypassed by removing alloc_pages()

> But this only affects new slab page allocation, while getting objects from
> existing slabs isn't subject to memory policies, so now it's at least
> consistent? Do you have some use case where it matters?

Yes this means you cannot redirect kmalloc based kernel metadata 
allocation when creating f.e. cgroups for another NUMA node. This affects 
all kernel metadata allocation during syscalls that used to be 
controllable via numa methods.

SLAB implemented memory allocations policies per object. SLUB moved that 
to implement these policies only when allocating a page frame. If this 
patch is left in then there wont be any support for memory allocation 
policies left in the slab allocators.

We have some internal patches now that implement memory policies on a per 
object basis for SLUB here.

This is a 10-15% regression on various benchmarks when objects like the 
scheduler statistics structures are misplaced.



  reply	other threads:[~2024-07-10 16:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28  8:57 [PATCH v2 0/6] Remove some lruvec page accounting functions Matthew Wilcox (Oracle)
2023-12-28  8:57 ` [PATCH v2 1/6] mm: Remove inc/dec lruvec page state functions Matthew Wilcox (Oracle)
2024-01-02 11:02   ` Vlastimil Babka
2023-12-28  8:57 ` [PATCH v2 2/6] slub: Use alloc_pages_node() in alloc_slab_page() Matthew Wilcox (Oracle)
2023-12-28 20:37   ` David Rientjes
2024-01-02 11:06   ` Vlastimil Babka
2024-07-09 17:12   ` Christoph Lameter (Ampere)
2024-07-10 10:35     ` Vlastimil Babka
2024-07-10 16:43       ` Christoph Lameter (Ampere) [this message]
2024-07-11  7:54         ` Vlastimil Babka
2024-07-11 18:04           ` Christoph Lameter (Ampere)
2024-07-12  7:47             ` Vlastimil Babka
2023-12-28  8:57 ` [PATCH v2 3/6] slub: Use folio APIs in free_large_kmalloc() Matthew Wilcox (Oracle)
2023-12-28 20:37   ` David Rientjes
2024-01-02 11:10   ` Vlastimil Babka
2023-12-28  8:57 ` [PATCH v2 4/6] slub: Use a folio in __kmalloc_large_node Matthew Wilcox (Oracle)
2023-12-28 20:37   ` David Rientjes
2024-01-02 11:21   ` Vlastimil Babka
2023-12-28  8:57 ` [PATCH v2 5/6] mm/khugepaged: Use a folio more in collapse_file() Matthew Wilcox (Oracle)
2023-12-28 21:10   ` Zi Yan
2024-01-02 11:24   ` Vlastimil Babka
2023-12-28  8:57 ` [PATCH v2 6/6] mm/memcontrol: Remove __mod_lruvec_page_state() Matthew Wilcox (Oracle)
2023-12-28 21:24   ` Zi Yan
2023-12-28 22:31   ` Shakeel Butt
2024-01-02 11:56   ` Vlastimil Babka

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=b9462180-b372-4793-77bc-8e70fbd0d304@gentwo.org \
    --to=cl@gentwo.org \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --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