From: Glauber Costa <glommer@parallels.com>
To: linux-mm@kvack.org
Cc: linux-fsdevel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Mel Gorman <mgorman@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Shrinnker <david@fromorbit.com>,
Michal Hocko <mhocko@suse.cz>,
kamezawa.hiroyu@jp.fujitsu.com, Pekka Enberg <penberg@kernel.org>,
Christoph Lameter <cl@linux.com>,
David Rientjes <rientjes@google.com>,
Glauber Costa <glommer@parallels.com>,
Pekka Enberg <penberg@cs.helsinki.fi>
Subject: [PATCH 2/3] slub: remove slab_alloc wrapper
Date: Wed, 19 Dec 2012 18:01:41 +0400 [thread overview]
Message-ID: <1355925702-7537-3-git-send-email-glommer@parallels.com> (raw)
In-Reply-To: <1355925702-7537-1-git-send-email-glommer@parallels.com>
Being slab_alloc such a simple and unconditional wrapper around
slab_alloc_node, we should get rid of it for simplicity, patching
the callers directly.
Signed-off-by: Glauber Costa <glommer@parallels.com>
CC: Christoph Lameter <cl@linux.com>
CC: David Rientjes <rientjes@google.com>
CC: Pekka Enberg <penberg@cs.helsinki.fi>
CC: Andrew Morton <akpm@linux-foundation.org>
---
mm/slub.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index ba2ca53..b72569c 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2389,15 +2389,9 @@ redo:
return object;
}
-static __always_inline void *slab_alloc(struct kmem_cache *s,
- gfp_t gfpflags, unsigned long addr)
-{
- return slab_alloc_node(s, gfpflags, NUMA_NO_NODE, addr);
-}
-
void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags)
{
- void *ret = slab_alloc(s, gfpflags, _RET_IP_);
+ void *ret = slab_alloc_node(s, gfpflags, NUMA_NO_NODE, _RET_IP_);
trace_kmem_cache_alloc(_RET_IP_, ret, s->object_size, s->size, gfpflags);
@@ -2408,7 +2402,7 @@ EXPORT_SYMBOL(kmem_cache_alloc);
#ifdef CONFIG_TRACING
void *kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size)
{
- void *ret = slab_alloc(s, gfpflags, _RET_IP_);
+ void *ret = slab_alloc_node(s, gfpflags, NUMA_NO_NODE, _RET_IP_);
trace_kmalloc(_RET_IP_, ret, size, s->size, gfpflags);
return ret;
}
@@ -3288,7 +3282,7 @@ void *__kmalloc(size_t size, gfp_t flags)
if (unlikely(ZERO_OR_NULL_PTR(s)))
return s;
- ret = slab_alloc(s, flags, _RET_IP_);
+ ret = slab_alloc_node(s, flags, NUMA_NO_NODE, _RET_IP_);
trace_kmalloc(_RET_IP_, ret, size, s->size, flags);
@@ -3938,7 +3932,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller)
if (unlikely(ZERO_OR_NULL_PTR(s)))
return s;
- ret = slab_alloc(s, gfpflags, caller);
+ ret = slab_alloc_node(s, gfpflags, NUMA_NO_NODE, caller);
/* Honor the call site pointer we received. */
trace_kmalloc(caller, ret, size, s->size, gfpflags);
--
1.7.11.7
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-12-19 14:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 14:01 [PATCH 0/3] retry slab allocation after first failure Glauber Costa
2012-12-19 14:01 ` [PATCH 1/3] slab: single entry-point for slab allocation Glauber Costa
2012-12-19 14:01 ` Glauber Costa [this message]
2013-01-02 16:03 ` [PATCH 2/3] slub: remove slab_alloc wrapper Christoph Lameter
2012-12-19 14:01 ` [PATCH 3/3] sl[auo]b: retry allocation once in case of failure Glauber Costa
2012-12-26 2:16 ` Kamezawa Hiroyuki
2012-12-26 7:55 ` Glauber Costa
2013-01-02 16:10 ` Christoph Lameter
2013-01-09 10:25 ` Glauber Costa
2013-01-02 16:32 ` [PATCH 0/3] retry slab allocation after first failure Christoph Lameter
2013-01-09 10:22 ` Glauber Costa
2013-01-09 15:38 ` Christoph Lameter
2013-01-09 15:59 ` Glauber Costa
2013-01-09 18:59 ` Christoph Lameter
2013-01-02 16:33 ` Christoph Lameter
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=1355925702-7537-3-git-send-email-glommer@parallels.com \
--to=glommer@parallels.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=david@fromorbit.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=penberg@cs.helsinki.fi \
--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