[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f93b5d12-d30c-84dd-3ef4-9e21f9f8cf0c@suse.cz>
Date: Thu, 24 Mar 2022 18:22:54 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Hyeonggon Yoo <42.hyeyoo@...il.com>, linux-mm@...ck.org
Cc: Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Marco Elver <elver@...gle.com>,
Matthew WilCox <willy@...radead.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 05/15] mm/slub: move kmalloc_large_node() to
slab_common.c
On 3/8/22 12:41, Hyeonggon Yoo wrote:
> In later patch SLAB will also pass requests larger than order-1 page
> to page allocator. Move kmalloc_large_node() to slab_common.c.
>
> Fold kmalloc_large_node_hook() into kmalloc_large_node() as there is
> no other caller.
>
> Move tracepoint in kmalloc_large_node().
>
> Add flag fix code. This exist in kmalloc_large() but omitted in
> kmalloc_large_node().
>
> Signed-off-by: Hyeonggon Yoo <42.hyeyoo@...il.com>
> ---
> include/linux/slab.h | 3 +++
> mm/slab_common.c | 26 ++++++++++++++++++++++++
> mm/slub.c | 47 ++++----------------------------------------
> 3 files changed, 33 insertions(+), 43 deletions(-)
>
<snip>
>
> @@ -4874,15 +4842,8 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
> struct kmem_cache *s;
> void *ret;
>
> - if (unlikely(size > KMALLOC_MAX_CACHE_SIZE)) {
> - ret = kmalloc_large_node(size, gfpflags, node);
> -
> - trace_kmalloc_node(caller, ret,
> - size, PAGE_SIZE << get_order(size),
> - gfpflags, node);
Hmm this throws away the caller for tracing, so looks like an unintended
functional change.
> -
> - return ret;
> - }
> + if (unlikely(size > KMALLOC_MAX_CACHE_SIZE))
> + return kmalloc_large_node(size, gfpflags, node);
>
> s = kmalloc_slab(size, gfpflags);
>
Powered by blists - more mailing lists