All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: move MACRO SLAB_NEVER_MERGE and SLAB_MERGE_SAME to file linux/slab.h
@ 2015-01-07  2:01 Bryton Lee
  2015-01-07  3:16   ` Christoph Lameter
  0 siblings, 1 reply; 6+ messages in thread
From: Bryton Lee @ 2015-01-07  2:01 UTC (permalink / raw)
  To: iamjoonsoo.kim
  Cc: cl, penberg, rientjes, akpm, linux-mm, linux-kernel,
	vger.linux-kernel.cn

[-- Attachment #1: Type: text/plain, Size: 1900 bytes --]

move MACRO SLAB_NEVER_MERGE and SLAB_MERGE_SAME from file mm/slab_common.c
to file linux/slab.h.
let other kernel code create slab can use these flags.

Signed-off-by: Bryton Lee <brytonlee01@gmail.com>
---
 include/linux/slab.h | 11 +++++++++++
 mm/slab_common.c     | 10 ----------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/include/linux/slab.h b/include/linux/slab.h
index 9a139b6..6853f85 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -90,6 +90,17 @@
 /* The following flags affect the page allocator grouping pages by
mobility */
 #define SLAB_RECLAIM_ACCOUNT    0x00020000UL        /* Objects are
reclaimable */
 #define SLAB_TEMPORARY        SLAB_RECLAIM_ACCOUNT    /* Objects are
short-lived */
+
+/*
+ * Set of flags that will prevent slab merging
+ */
+#define SLAB_NEVER_MERGE (SLAB_RED_ZONE | SLAB_POISON | SLAB_STORE_USER | \
+        SLAB_TRACE | SLAB_DESTROY_BY_RCU | SLAB_NOLEAKTRACE | \
+        SLAB_FAILSLAB)
+
+#define SLAB_MERGE_SAME (SLAB_DEBUG_FREE | SLAB_RECLAIM_ACCOUNT | \
+        SLAB_CACHE_DMA | SLAB_NOTRACK)
+
 /*
  * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.
  *
diff --git a/mm/slab_common.c b/mm/slab_common.c
index e03dd6f..4f1974b 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -31,16 +31,6 @@ DEFINE_MUTEX(slab_mutex);
 struct kmem_cache *kmem_cache;

 /*
- * Set of flags that will prevent slab merging
- */
-#define SLAB_NEVER_MERGE (SLAB_RED_ZONE | SLAB_POISON | SLAB_STORE_USER | \
-        SLAB_TRACE | SLAB_DESTROY_BY_RCU | SLAB_NOLEAKTRACE | \
-        SLAB_FAILSLAB)
-
-#define SLAB_MERGE_SAME (SLAB_DEBUG_FREE | SLAB_RECLAIM_ACCOUNT | \
-        SLAB_CACHE_DMA | SLAB_NOTRACK)
-
-/*
  * Merge control. If this is set then no merging of slab caches will occur.
  * (Could be removed. This was introduced to pacify the merge skeptics.)
  */
-- 
2.0.5



-- 
Best Regards

Bryton.Lee

[-- Attachment #2: Type: text/html, Size: 2287 bytes --]

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

end of thread, other threads:[~2015-01-21 22:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-07  2:01 [PATCH] mm: move MACRO SLAB_NEVER_MERGE and SLAB_MERGE_SAME to file linux/slab.h Bryton Lee
2015-01-07  3:16 ` Christoph Lameter
2015-01-07  3:16   ` Christoph Lameter
2015-01-07  7:32   ` Bryton Lee
2015-01-21 22:44     ` David Rientjes
2015-01-21 22:44       ` David Rientjes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.