linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Bryton Lee <brytonlee01@gmail.com>
To: iamjoonsoo.kim@lge.com
Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	"vger.linux-kernel.cn" <kernel@vger.linux-kernel.cn>
Subject: [PATCH] mm: move MACRO SLAB_NEVER_MERGE and SLAB_MERGE_SAME to file linux/slab.h
Date: Wed, 7 Jan 2015 10:01:14 +0800	[thread overview]
Message-ID: <CAC2pzGe9Q+19LpyFPwr8+TZ02XfCqwrQzsEsJA8WWB6XhuJyeQ@mail.gmail.com> (raw)

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

             reply	other threads:[~2015-01-07  2:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07  2:01 Bryton Lee [this message]
2015-01-07  3:16 ` Christoph Lameter
2015-01-07  7:32   ` Bryton Lee
2015-01-21 22:44     ` David Rientjes

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=CAC2pzGe9Q+19LpyFPwr8+TZ02XfCqwrQzsEsJA8WWB6XhuJyeQ@mail.gmail.com \
    --to=brytonlee01@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kernel@vger.linux-kernel.cn \
    --cc=linux-kernel@vger.kernel.org \
    --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