]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] cpuset: number_of_cpusets optimization
authorPaul Jackson <pj@sgi.com>
Sun, 8 Jan 2006 09:01:57 +0000 (01:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:13:44 +0000 (20:13 -0800)
commitd1e8d7738561326dbae158a21f316667a5457222
treef50551f9588f9090fee17130614e17a2dd64c656
parent5ff0fb9a2ab3457625f42cbf4ebe4ea4c349f662
[PATCH] cpuset: number_of_cpusets optimization

Easy little optimization hack to avoid actually having to call
cpuset_zone_allowed() and check mems_allowed, in the main page allocation
routine, __alloc_pages().  This saves several CPU cycles per page allocation
on systems not using cpusets.

A counter is updated each time a cpuset is created or removed, and whenever
there is only one cpuset in the system, it must be the root cpuset, which
contains all CPUs and all Memory Nodes.  In that case, when the counter is
one, all allocations are allowed.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/cpuset.h
kernel/cpuset.c