set correct numa_zonelist_order string when configured on the kernel command line
Subsystems (2)
PATCH 1/1 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.
---
mm/page_alloc.c +10 -3
@@ -2585,9 +2585,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);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · On Tue, 14 Dec 2010 12:27:09 +0200 "Volodymyr G. Lukiianyk"…
When
numa_zonelist_orderparameter is set to "node" or "zone" on the command line it's still showing as "default" in sysctl. That's becauseearly_paramparsing function changes onlyuser_zonelist_ordervariable. Fix this by copying user-provided string tonuma_zonelist_orderif it was successfully parsed.Signed-off-by Volodymyr G Lukiianyk <[email protected]>
Thank you.
Quoted 28 lines
---
mm/page_alloc.c +10
-4@@ -2585,9 +2585,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); --
Quoted 6 lines
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>