summaryrefslogtreecommitdiff
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-06-25 02:56:28 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-25 03:49:41 +0300
commita9919c79359df9a706ff9e14fc0a93cd15791c9b (patch)
tree32bb182bd88f0fb58bfe891b26290bf53b5a6d37 /mm/page_alloc.c
parenta67a31fa308a9032ead31b0501dafdb44ccf5a12 (diff)
downloadlinux-a9919c79359df9a706ff9e14fc0a93cd15791c9b.tar.xz
mm: only define hashdist variable when needed
For !CONFIG_NUMA, hashdist will always be 0, since it's setter is otherwise compiled out. So we can save 4 bytes of data and some .text (although mostly in __init functions) by only defining it for CONFIG_NUMA. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ebffa0e4a9c0..159dbbc3375d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6013,9 +6013,9 @@ out:
return ret;
}
+#ifdef CONFIG_NUMA
int hashdist = HASHDIST_DEFAULT;
-#ifdef CONFIG_NUMA
static int __init set_hashdist(char *str)
{
if (!str)