public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] mm: sl[aou]b: introduce kmem_cache_zalloc_node()
@ 2014-11-10 12:06 Andrey Ryabinin
  2014-11-10 12:06 ` [PATCH 2/3] kernel: irq: use a kmem_cache for allocating struct irq_desc Andrey Ryabinin
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Andrey Ryabinin @ 2014-11-10 12:06 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, Andrey Ryabinin, Christoph Lameter, Andrew Morton,
	linux-mm, Pekka Enberg, David Rientjes

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


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

end of thread, other threads:[~2014-11-21  9:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10 12:06 [PATCH 1/3] mm: sl[aou]b: introduce kmem_cache_zalloc_node() Andrey Ryabinin
2014-11-10 12:06 ` [PATCH 2/3] kernel: irq: use a kmem_cache for allocating struct irq_desc Andrey Ryabinin
2014-11-19 23:52   ` David Rientjes
2014-11-20  8:53     ` Andrey Ryabinin
2014-11-10 12:06 ` [PATCH 3/3] kernel: irq: use kmem_cache for allocating struct irqaction Andrey Ryabinin
2014-11-19 23:46 ` [PATCH 1/3] mm: sl[aou]b: introduce kmem_cache_zalloc_node() 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox