From: Christoph Lameter <cl@linux.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <js1304@gmail.com>,
Glauber Costa <glommer@parallels.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
David Rientjes <rientjes@google.com>
Subject: Re: [3.11 3/4] Move kmalloc_node functions to common code
Date: Tue, 18 Jun 2013 17:02:34 +0000 [thread overview]
Message-ID: <0000013f583ce865-d803292b-f217-4fb7-a8c2-4366334cb425-000000@email.amazonses.com> (raw)
In-Reply-To: <CAOJsxLHPWJdc6Qy9e7-s-7+KWPOgbs8ZR+JpxWb9sykyC9Um8A@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2922 bytes --]
On Tue, 18 Jun 2013, Pekka Enberg wrote:
> I'm seeing this after "make defconfig" on x86-64:
>
> CC mm/slub.o
> mm/slub.c:2445:7: error: conflicting types for i? 1/2 kmem_cache_alloc_node_tracei? 1/2
> include/linux/slab.h:311:14: note: previous declaration of
> i? 1/2 kmem_cache_alloc_node_tracei? 1/2 was here
> mm/slub.c:2455:1: error: conflicting types for i? 1/2 kmem_cache_alloc_node_tracei? 1/2
> include/linux/slab.h:311:14: note: previous declaration of
> i? 1/2 kmem_cache_alloc_node_tracei? 1/2 was here
> make[1]: *** [mm/slub.o] Error 1
> make: *** [mm/slub.o] Error 2
Gosh I dropped the size_t parameter from these functions. CONFIG_TRACING
needs these.
Subject: Fix kmem_cache_alloc*_trace parameters
The size parameter is needed.
Signed-off-by: Christoph Lameter <cl@linux.com>
Index: linux/include/linux/slab.h
===================================================================
--- linux.orig/include/linux/slab.h 2013-06-18 11:45:22.472313944 -0500
+++ linux/include/linux/slab.h 2013-06-18 11:53:29.816926981 -0500
@@ -313,12 +313,12 @@ static __always_inline void *kmem_cache_
#ifdef CONFIG_TRACING
extern void *kmem_cache_alloc_node_trace(struct kmem_cache *s,
gfp_t gfpflags,
- int node);
+ int node, size_t size);
#else
static __always_inline void *
kmem_cache_alloc_node_trace(struct kmem_cache *s,
gfp_t gfpflags,
- int node)
+ int node, size_t size)
{
return kmem_cache_alloc_node(s, gfpflags, node);
}
@@ -360,10 +360,10 @@ static __always_inline void *kmalloc_lar
}
#ifdef CONFIG_TRACING
-extern void *kmem_cache_alloc_trace(struct kmem_cache *, gfp_t);
+extern void *kmem_cache_alloc_trace(struct kmem_cache *, gfp_t, size_t);
#else
static __always_inline void *kmem_cache_alloc_trace(struct kmem_cache *s,
- gfp_t flags)
+ gfp_t flags, size_t size)
{
return kmem_cache_alloc(s, flags);
}
@@ -390,7 +390,7 @@ static __always_inline void *kmalloc(siz
return ZERO_SIZE_PTR;
return kmem_cache_alloc_trace(kmalloc_caches[index],
- flags);
+ flags, size);
}
#endif
}
@@ -428,7 +428,7 @@ static __always_inline void *kmalloc_nod
return ZERO_SIZE_PTR;
return kmem_cache_alloc_node_trace(kmalloc_caches[i],
- flags, node);
+ flags, node, size);
}
#endif
return __kmalloc_node(size, flags, node);
Index: linux/mm/slab.c
===================================================================
--- linux.orig/mm/slab.c 2013-06-18 11:45:15.984199533 -0500
+++ linux/mm/slab.c 2013-06-18 11:54:23.857883936 -0500
@@ -3681,7 +3681,7 @@ __do_kmalloc_node(size_t size, gfp_t fla
cachep = kmalloc_slab(size, flags);
if (unlikely(ZERO_OR_NULL_PTR(cachep)))
return cachep;
- return kmem_cache_alloc_node_trace(cachep, flags, node);
+ return kmem_cache_alloc_node_trace(cachep, flags, node, size);
}
#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_TRACING)
next prev parent reply other threads:[~2013-06-18 17:02 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130614195500.373711648@linux.com>
2013-06-14 19:55 ` [3.11 1/4] slub: Make cpu partial slab support configurable V2 Christoph Lameter
2013-06-18 6:35 ` Pekka Enberg
2013-06-18 14:17 ` Christoph Lameter
2013-06-18 15:21 ` Clark Williams
2013-06-18 15:25 ` Pekka Enberg
2013-06-25 14:24 ` Steven Rostedt
2013-07-01 18:16 ` Christoph Lameter
2013-07-02 15:09 ` Clark Williams
2013-07-02 16:47 ` Christoph Lameter
2013-07-02 16:53 ` Clark Williams
2013-07-17 2:46 ` Steven Rostedt
2013-07-17 7:04 ` Pekka Enberg
2013-07-17 12:23 ` Steven Rostedt
2013-07-17 15:04 ` Christoph Lameter
2013-07-17 15:15 ` Steven Rostedt
2013-07-17 15:24 ` Steven Rostedt
2013-06-19 5:22 ` Joonsoo Kim
2013-06-19 14:29 ` Christoph Lameter
2013-06-20 1:50 ` Joonsoo Kim
2013-06-20 2:53 ` Wanpeng Li
2013-06-20 2:53 ` Wanpeng Li
[not found] ` <51c26ebd.e842320a.5dc1.ffffedfcSMTPIN_ADDED_BROKEN@mx.google.com>
2013-06-20 5:45 ` Joonsoo Kim
2013-06-20 5:50 ` Joonsoo Kim
2013-07-07 16:10 ` Pekka Enberg
2013-06-14 19:55 ` [3.11 2/4] slob: Rework #ifdeffery in slab.h Christoph Lameter
2013-06-14 20:06 ` [3.11 4/4] Move kmalloc definitions to slab.h Christoph Lameter
2013-06-14 20:06 ` [3.11 3/4] Move kmalloc_node functions to common code Christoph Lameter
2013-06-18 15:38 ` Pekka Enberg
2013-06-18 17:02 ` Christoph Lameter [this message]
2013-07-07 16:14 ` Pekka Enberg
2013-07-08 18:55 ` Christoph Lameter
2013-06-19 6:30 ` Joonsoo Kim
2013-06-19 14:33 ` Christoph Lameter
2013-06-20 1:51 ` Joonsoo Kim
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=0000013f583ce865-d803292b-f217-4fb7-a8c2-4366334cb425-000000@email.amazonses.com \
--to=cl@linux.com \
--cc=glommer@parallels.com \
--cc=js1304@gmail.com \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.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