]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] cpuset: combine refresh_mems and update_mems
authorPaul Jackson <pj@sgi.com>
Sun, 8 Jan 2006 09:01:54 +0000 (01:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:13:43 +0000 (20:13 -0800)
commitcf2a473c4089aa41c26f653200673f5a4cc25047
tree0bce21f4684a382b13e93ba5b85409cf5eab1c2c
parentb4b2641843db124637fa3d2cb2101982035dcc82
[PATCH] cpuset: combine refresh_mems and update_mems

The important code paths through alloc_pages_current() and alloc_page_vma(),
by which most kernel page allocations go, both called
cpuset_update_current_mems_allowed(), which in turn called refresh_mems().
-Both- of these latter two routines did a tasklock, got the tasks cpuset
pointer, and checked for out of date cpuset->mems_generation.

That was a silly duplication of code and waste of CPU cycles on an important
code path.

Consolidated those two routines into a single routine, called
cpuset_update_task_memory_state(), since it updates more than just
mems_allowed.

Changed all callers of either routine to call the new consolidated routine.

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
mm/mempolicy.c