From: Andrey Ryabinin <a.ryabinin@samsung.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
Andrey Ryabinin <a.ryabinin@samsung.com>,
Christoph Lameter <cl@linux.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>
Subject: [PATCH 1/3] mm: sl[aou]b: introduce kmem_cache_zalloc_node()
Date: Mon, 10 Nov 2014 15:06:56 +0300 [thread overview]
Message-ID: <1415621218-6438-1-git-send-email-a.ryabinin@samsung.com> (raw)
kmem_cache_zalloc_node() allocates zeroed memory for a particular
cache from a specified memory node. To be used for struct irq_desc.
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
---
include/linux/slab.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index c265bec..b3248fa 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -574,6 +574,12 @@ static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)
return kmem_cache_alloc(k, flags | __GFP_ZERO);
}
+static inline void *kmem_cache_zalloc_node(struct kmem_cache *k, gfp_t flags,
+ int node)
+{
+ return kmem_cache_alloc_node(k, flags | __GFP_ZERO, node);
+}
+
/**
* kzalloc - allocate memory. The memory is set to zero.
* @size: how many bytes of memory are required.
--
2.1.3
--
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 reply other threads:[~2014-11-10 12:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 12:06 Andrey Ryabinin [this message]
2014-11-19 23:46 ` David Rientjes
2014-11-20 8:47 ` Andrey Ryabinin
2014-11-20 20:03 ` Christoph Lameter
2014-11-20 22:31 ` David Rientjes
2014-11-21 6:29 ` Andrey Ryabinin
2014-11-21 9:57 ` 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=1415621218-6438-1-git-send-email-a.ryabinin@samsung.com \
--to=a.ryabinin@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
/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