summaryrefslogtreecommitdiffstats
path: root/mm/slab_common.c
diff options
context:
space:
mode:
authorVladimir Davydov <vdavydov@parallels.com>2014-06-04 16:07:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 16:53:58 -0700
commitcea371f4f39ced101d27264eddb8cf8c749fdd00 (patch)
tree77949b74e25554e0cfbc3cc1647d1014d4eb75ba /mm/slab_common.c
parent56a3c655a3d31cb1afef25b530b5ef6a1e7ddefd (diff)
downloadlinux-cea371f4f39ced101d27264eddb8cf8c749fdd00.tar.bz2
slab: document kmalloc_order
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 1950c8f4d1a6..2834bc2886fd 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -582,6 +582,11 @@ void __init create_kmalloc_caches(unsigned long flags)
}
#endif /* !CONFIG_SLOB */
+/*
+ * To avoid unnecessary overhead, we pass through large allocation requests
+ * directly to the page allocator. We use __GFP_COMP, because we will need to
+ * know the allocation order to free the pages properly in kfree.
+ */
void *kmalloc_order(size_t size, gfp_t flags, unsigned int order)
{
void *ret;