linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/4] slub: replace SLAB_NODE_UNSPECIFIED with NUMA_NO_NODE
@ 2010-06-09  6:49 David Rientjes
  2010-06-09  6:49 ` [patch 2/4] slub: rename debug_on to cache_debug_on David Rientjes
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: David Rientjes @ 2010-06-09  6:49 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: Christoph Lameter, linux-mm

NUMA_NO_NODE is used in generic kernel code to define the constant -1,
which means that no specific node is actually required.

Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: David Rientjes <rientjes@google.com>
---
 include/linux/slab.h |    2 --
 mm/slub.c            |   10 +++++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/include/linux/slab.h b/include/linux/slab.h
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -92,8 +92,6 @@
 #define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \
 				(unsigned long)ZERO_SIZE_PTR)
 
-#define SLAB_NODE_UNSPECIFIED (-1L)
-
 /*
  * struct kmem_cache related prototypes
  */
diff --git a/mm/slub.c b/mm/slub.c
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1092,7 +1092,7 @@ static inline struct page *alloc_slab_page(gfp_t flags, int node,
 
 	flags |= __GFP_NOTRACK;
 
-	if (node == SLAB_NODE_UNSPECIFIED)
+	if (node == NUMA_NO_NODE)
 		return alloc_pages(flags, order);
 	else
 		return alloc_pages_node(node, flags, order);
@@ -1743,7 +1743,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
 
 void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags)
 {
-	void *ret = slab_alloc(s, gfpflags, SLAB_NODE_UNSPECIFIED, _RET_IP_);
+	void *ret = slab_alloc(s, gfpflags, NUMA_NO_NODE, _RET_IP_);
 
 	trace_kmem_cache_alloc(_RET_IP_, ret, s->objsize, s->size, gfpflags);
 
@@ -1754,7 +1754,7 @@ EXPORT_SYMBOL(kmem_cache_alloc);
 #ifdef CONFIG_TRACING
 void *kmem_cache_alloc_notrace(struct kmem_cache *s, gfp_t gfpflags)
 {
-	return slab_alloc(s, gfpflags, SLAB_NODE_UNSPECIFIED, _RET_IP_);
+	return slab_alloc(s, gfpflags, NUMA_NO_NODE, _RET_IP_);
 }
 EXPORT_SYMBOL(kmem_cache_alloc_notrace);
 #endif
@@ -2758,7 +2758,7 @@ void *__kmalloc(size_t size, gfp_t flags)
 	if (unlikely(ZERO_OR_NULL_PTR(s)))
 		return s;
 
-	ret = slab_alloc(s, flags, SLAB_NODE_UNSPECIFIED, _RET_IP_);
+	ret = slab_alloc(s, flags, NUMA_NO_NODE, _RET_IP_);
 
 	trace_kmalloc(_RET_IP_, ret, size, s->size, flags);
 
@@ -3342,7 +3342,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, SLAB_NODE_UNSPECIFIED, caller);
+	ret = slab_alloc(s, gfpflags, NUMA_NO_NODE, caller);
 
 	/* Honor the call site pointer we recieved. */
 	trace_kmalloc(caller, ret, size, s->size, gfpflags);

--
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>

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-06-16 15:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09  6:49 [patch 1/4] slub: replace SLAB_NODE_UNSPECIFIED with NUMA_NO_NODE David Rientjes
2010-06-09  6:49 ` [patch 2/4] slub: rename debug_on to cache_debug_on David Rientjes
2010-06-09 16:20   ` Christoph Lameter
2010-06-09  6:49 ` [patch 3/4] slub: use is_kmalloc_cache in dma_kmalloc_cache David Rientjes
2010-06-09 16:24   ` Christoph Lameter
2010-06-09 19:47     ` David Rientjes
2010-06-09  6:49 ` [patch 4/4] slub: remove gfp_flags argument from create_kmalloc_cache David Rientjes
2010-06-09 16:24   ` Christoph Lameter
2010-06-09 16:44     ` Pekka Enberg
2010-06-15 17:33       ` Christoph Lameter
2010-06-15 21:39         ` David Rientjes
2010-06-16 15:26           ` Christoph Lameter
2010-06-09 16:18 ` [patch 1/4] slub: replace SLAB_NODE_UNSPECIFIED with NUMA_NO_NODE Christoph Lameter
2010-06-09 16:44   ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).