aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-09-29 08:02:15 -0400
committerPekka Enberg <penberg@kernel.org>2010-10-02 03:47:53 -0400
commit5d1f57e4d3d547b113ebd62f569be13bf485e53b (patch)
treeb97e925dc448129a8b30abb35597bde154042eef
parent3478973dedee5e957c45dc93c11d12dc3f733ee0 (diff)
slub: Move NUMA-related functions under CONFIG_NUMA
Make kmalloc_cache_alloc_node_notrace(), kmalloc_large_node() and __kmalloc_node_track_caller() to be compiled only when CONFIG_NUMA is selected. Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--mm/slub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 118422e220f0..9f121c10184f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1792,7 +1792,6 @@ void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t gfpflags, int node)
1792 return ret; 1792 return ret;
1793} 1793}
1794EXPORT_SYMBOL(kmem_cache_alloc_node); 1794EXPORT_SYMBOL(kmem_cache_alloc_node);
1795#endif
1796 1795
1797#ifdef CONFIG_TRACING 1796#ifdef CONFIG_TRACING
1798void *kmem_cache_alloc_node_notrace(struct kmem_cache *s, 1797void *kmem_cache_alloc_node_notrace(struct kmem_cache *s,
@@ -1803,6 +1802,7 @@ void *kmem_cache_alloc_node_notrace(struct kmem_cache *s,
1803} 1802}
1804EXPORT_SYMBOL(kmem_cache_alloc_node_notrace); 1803EXPORT_SYMBOL(kmem_cache_alloc_node_notrace);
1805#endif 1804#endif
1805#endif
1806 1806
1807/* 1807/*
1808 * Slow patch handling. This may still be called frequently since objects 1808 * Slow patch handling. This may still be called frequently since objects
@@ -2673,6 +2673,7 @@ void *__kmalloc(size_t size, gfp_t flags)
2673} 2673}
2674EXPORT_SYMBOL(__kmalloc); 2674EXPORT_SYMBOL(__kmalloc);
2675 2675
2676#ifdef CONFIG_NUMA
2676static void *kmalloc_large_node(size_t size, gfp_t flags, int node) 2677static void *kmalloc_large_node(size_t size, gfp_t flags, int node)
2677{ 2678{
2678 struct page *page; 2679 struct page *page;
@@ -2687,7 +2688,6 @@ static void *kmalloc_large_node(size_t size, gfp_t flags, int node)
2687 return ptr; 2688 return ptr;
2688} 2689}
2689 2690
2690#ifdef CONFIG_NUMA
2691void *__kmalloc_node(size_t size, gfp_t flags, int node) 2691void *__kmalloc_node(size_t size, gfp_t flags, int node)
2692{ 2692{
2693 struct kmem_cache *s; 2693 struct kmem_cache *s;
@@ -3342,6 +3342,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller)
3342 return ret; 3342 return ret;
3343} 3343}
3344 3344
3345#ifdef CONFIG_NUMA
3345void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, 3346void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
3346 int node, unsigned long caller) 3347 int node, unsigned long caller)
3347{ 3348{
@@ -3370,6 +3371,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
3370 3371
3371 return ret; 3372 return ret;
3372} 3373}
3374#endif
3373 3375
3374#ifdef CONFIG_SLUB_DEBUG 3376#ifdef CONFIG_SLUB_DEBUG
3375static int count_inuse(struct page *page) 3377static int count_inuse(struct page *page)