aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolodymyr G. Lukiianyk <[email protected]>2011-01-13 15:46:26 -0800
committerLinus Torvalds <[email protected]>2011-01-13 17:32:37 -0800
commitecb256f815232b35ae8382cff36ca8ce0bbd077e (patch)
tree4f488ba29b5bf860576a3a2e405607a9c32048bf
parentdc83edd941f412e938841b4989be24aa288a1aa6 (diff)
mm: set correct numa_zonelist_order string when configured on the kernel command line
When numa_zonelist_order parameter is set to "node" or "zone" on the command line it's still showing as "default" in sysctl. That's because early_param parsing function changes only user_zonelist_order variable. Fix this by copying user-provided string to numa_zonelist_order if it was successfully parsed. Signed-off-by: Volodymyr G Lukiianyk <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/page_alloc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c31460918506..c18d1f7cff84 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2631,9 +2631,16 @@ static int __parse_numa_zonelist_order(char *s)
static __init int setup_numa_zonelist_order(char *s)
{
- if (s)
- return __parse_numa_zonelist_order(s);
- return 0;
+ int ret;
+
+ if (!s)
+ return 0;
+
+ ret = __parse_numa_zonelist_order(s);
+ if (ret == 0)
+ strlcpy(numa_zonelist_order, s, NUMA_ZONELIST_ORDER_LEN);
+
+ return ret;
}
early_param("numa_zonelist_order", setup_numa_zonelist_order);