Convert mempolicy.c to nodemasks, take 2
Subsystems (4)
PATCH 1/1 Convert mempolicy.c to nodemasks, take 2
Convert mempolicies to nodemask_t
[Note to Andrew: this has a hunk for the /proc/*/numa_maps code to make it compile again. But you said you queued a revert patch, with which this will likely conflict. If yes just remove the fs/proc/task_mmu.c hunk. Thanks.]
This version includes the fixes for the issues Paul noted.
The NUMA policy code predated nodemask_t so it used open coded bitmaps. Convert everything to nodemask_t. Big patch, but shouldn't have any actual behaviour changes (except I removed one unnecessary check against node_online_map and one unnecessary BUG_ON)
include/linux/mempolicy.h +2 -2
@@ -27,10 +27,10 @@#include <linux/config.h> #include <linux/mmzone.h> -#include <linux/bitmap.h> #include <linux/slab.h> #include <linux/rbtree.h> #include <linux/spinlock.h> +#include <linux/nodemask.h> struct vm_area_struct ;
@@ -63,7 +63,7 @@ struct mempolicy {union {struct zonelist *zonelist;/* bind */ short preferred_node;/* preferred */ - DECLARE_BITMAP(nodes, MAX_NUMNODES); /* interleave */ +nodemask_t nodes;/* interleave */ /* undefined for default */ } v; };
mm/mempolicy.c +54 -68
348 lines not on this page · raw message
fs/proc/task_mmu.c +1 -1
@@ -469,7 +469,7 @@ static int show_numa_map(struct seq_fileseq_printf (m," interleave={" ); first =1 ;for_each_node (n) { -if (test_bit (n, pol->v.nodes)) { +if (node_isset (n, pol->v.nodes)) {if (!first)seq_putc (m,',' );else
Quoted 1 line · Andi
Convert mempolicies to
nodemask_t
Signature · 3 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401Quoted 3 lines · Andi Kleen
Convert mempolicies to
nodemask_t
....
This version includes the fixes for the issues Paul noted.
I couldn't boot 2.6.13-mm3 with CONFIG_NUMA_EMU=y yesterday, oopsed on some bad address in interleave_nodes(). But replacing the old version of the patch with this, I can now boot it again - thanks.
Hugh