]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] cpusets: bitmap and mask remap operators
authorPaul Jackson <pj@sgi.com>
Sun, 30 Oct 2005 23:02:33 +0000 (15:02 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:21 +0000 (17:37 -0800)
commit174a9b664d61e9a393252d4ffd8863b9c741838f
treef947a4dcf103f55d526bb5c71f69b657d8f22e61
parent44abdbac9b492361d0fd3fc8b39751366f487840
[PATCH] cpusets: bitmap and mask remap operators

In the forthcoming task migration support, a key calculation will be
mapping cpu and node numbers from the old set to the new set while
preserving cpuset-relative offset.

For example, if a task and its pages on nodes 8-11 are being migrated to
nodes 24-27, then pages on node 9 (the 2nd node in the old set) should be
moved to node 25 (the 2nd node in the new set.)

As with other bitmap operations, the proper way to code this is to provide
the underlying calculation in lib/bitmap.c, and then to provide the usual
cpumask and nodemask wrappers.

This patch provides that.  These operations are termed 'remap' operations.
Both remapping a single bit and a set of bits is supported.

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/bitmap.h
include/linux/cpumask.h
include/linux/nodemask.h
lib/bitmap.c