Skip to content

Commit

Permalink
mm: set correct numa_zonelist_order string when configured on the ker…
Browse files Browse the repository at this point in the history
…nel 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 <volodymyrgl@gmail.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Volodymyr G. Lukiianyk authored and Linus Torvalds committed Jan 14, 2011
1 parent dc83edd commit ecb256f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ecb256f

Please sign in to comment.