cgroups: use vmalloc for large cgroups pidlist allocations
authorBen Blum <bblum@google.com>
Wed, 23 Sep 2009 22:56:28 +0000 (15:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Sep 2009 14:20:58 +0000 (07:20 -0700)
commitd1d9fd3308fdef6b4bf564fa3d6cfe35b68b50bc
tree8de392166f2edb696950a90e468ef27f043be509
parent72a8cb30d10d4041c455a7054607a7d519167c87
cgroups: use vmalloc for large cgroups pidlist allocations

Separates all pidlist allocation requests to a separate function that
judges based on the requested size whether or not the array needs to be
vmalloced or can be gotten via kmalloc, and similar for kfree/vfree.

Signed-off-by: Ben Blum <bblum@google.com>
Signed-off-by: Paul Menage <menage@google.com>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cgroup.c