]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
sched: numa: Fix build error if CONFIG_NUMA_BALANCING && !CONFIG_TRANSPARENT_HUGEPAGE
authorMel Gorman <mgorman@suse.de>
Mon, 17 Dec 2012 14:05:53 +0000 (14:05 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 17 Dec 2012 16:25:50 +0000 (08:25 -0800)
Michal Hocko reported that the following build error occurs if
CONFIG_NUMA_BALANCING is set without THP support

  kernel/sched/fair.c: In function ‘task_numa_work’:
  kernel/sched/fair.c:932:55: error: call to ‘__build_bug_failed’ declared with attribute error: BUILD_BUG failed

The problem is that HPAGE_PMD_SHIFT triggers a BUILD_BUG() on
!CONFIG_TRANSPARENT_HUGEPAGE. This patch addresses the problem.

Reported-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sched/fair.c

index 9af5af979a1344ec8ddd4bab9f392238e8c00670..4603d6cb9e259480de0a076e89a69bbb5cfc189b 100644 (file)
@@ -929,7 +929,7 @@ void task_numa_work(struct callback_head *work)
                        continue;
 
                /* Skip small VMAs. They are not likely to be of relevance */
-               if (((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) < HPAGE_PMD_NR)
+               if (vma->vm_end - vma->vm_start < HPAGE_SIZE)
                        continue;
 
                do {