- slab-optimize-kmalloc_node-the-same-way-as-kmalloc.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     slab: optimize kmalloc_node the same way as kmalloc

has been removed from the -mm tree.  Its filename is

     slab-optimize-kmalloc_node-the-same-way-as-kmalloc.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: slab: optimize kmalloc_node the same way as kmalloc
From: Christoph Hellwig <hch@xxxxxx>

[akpm@xxxxxxxx: export fix]
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Christoph Lameter <clameter@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/slab.h |   25 ++++++++++++++++++++++++-
 mm/slab.c            |    4 ++--
 2 files changed, 26 insertions(+), 3 deletions(-)

diff -puN include/linux/slab.h~slab-optimize-kmalloc_node-the-same-way-as-kmalloc include/linux/slab.h
--- a/include/linux/slab.h~slab-optimize-kmalloc_node-the-same-way-as-kmalloc
+++ a/include/linux/slab.h
@@ -202,7 +202,30 @@ extern int slab_is_available(void);
 
 #ifdef CONFIG_NUMA
 extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node);
-extern void *kmalloc_node(size_t size, gfp_t flags, int node);
+extern void *__kmalloc_node(size_t size, gfp_t flags, int node);
+
+static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
+{
+	if (__builtin_constant_p(size)) {
+		int i = 0;
+#define CACHE(x) \
+		if (size <= x) \
+			goto found; \
+		else \
+			i++;
+#include "kmalloc_sizes.h"
+#undef CACHE
+		{
+			extern void __you_cannot_kmalloc_that_much(void);
+			__you_cannot_kmalloc_that_much();
+		}
+found:
+		return kmem_cache_alloc_node((flags & GFP_DMA) ?
+			malloc_sizes[i].cs_dmacachep :
+			malloc_sizes[i].cs_cachep, flags, node);
+	}
+	return __kmalloc_node(size, flags, node);
+}
 #else
 static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, gfp_t flags, int node)
 {
diff -puN mm/slab.c~slab-optimize-kmalloc_node-the-same-way-as-kmalloc mm/slab.c
--- a/mm/slab.c~slab-optimize-kmalloc_node-the-same-way-as-kmalloc
+++ a/mm/slab.c
@@ -3348,7 +3348,7 @@ void *kmem_cache_alloc_node(struct kmem_
 }
 EXPORT_SYMBOL(kmem_cache_alloc_node);
 
-void *kmalloc_node(size_t size, gfp_t flags, int node)
+void *__kmalloc_node(size_t size, gfp_t flags, int node)
 {
 	struct kmem_cache *cachep;
 
@@ -3357,7 +3357,7 @@ void *kmalloc_node(size_t size, gfp_t fl
 		return NULL;
 	return kmem_cache_alloc_node(cachep, flags, node);
 }
-EXPORT_SYMBOL(kmalloc_node);
+EXPORT_SYMBOL(__kmalloc_node);
 #endif
 
 /**
_

Patches currently in -mm which might be from hch@xxxxxx are

origin.patch
add-address_space_operationsbatch_write.patch
add-address_space_operationsbatch_write-fix.patch
pass-io-size-to-batch_write-address-space-operation.patch
freevxfs-fix-leak-on-error-path.patch
vectorize-aio_read-aio_write-fileop-methods.patch
remove-readv-writev-methods-and-use-aio_read-aio_write.patch
streamline-generic_file_-interfaces-and-filemap.patch
add-vector-aio-support.patch
add-vector-aio-support-fix.patch
r-o-bind-mount-prepare-for-write-access-checks-collapse-if.patch
r-o-bind-mount-prepwork-move-open_nameis-vfs_create.patch
r-o-bind-mount-unlink-monitor-i_nlink.patch
r-o-bind-mount-prepwork-inc_nlink-helper.patch
r-o-bind-mount-clean-up-ocfs2-nlink-handling-2.patch
r-o-bind-mount-monitor-zeroing-of-i_nlink.patch
kprobes-make-kprobe-modules-more-portable.patch
kprobes-make-kprobe-modules-more-portable-update.patch
ecryptfs-mmap-operations.patch
ecryptfs-dont-muck-with-the-existing-nameidata-structures.patch
streamline-generic_file_-interfaces-and-filemap-ecryptfs.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux