mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH tip:x86/urgent] x86, NUMA: Fix empty memblk detection in numa_cleanup_meminfo()
@ 2011-05-01 10:45 Tejun Heo
  2011-05-01 16:53 ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2011-05-01 10:45 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, x86, Yinghai Lu

From: Yinghai Lu <yinghai@kernel.org>

numa_cleanup_meminfo() trims each memblk between low (0) and high
(max_pfn) limits and discards empty ones.  However, the emptiness
detection incorrectly used equality test.  If the start of a memblk is
higher than max_pfn, it is empty but fails the equality test and
doesn't get discarded.

Fix it by using >= instead of ==.

tj: Extracted the actual fix from the original patch and rewrote patch
    description.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
---
Ingo, can you please push this to mainline?  Once it hits x86/urgent,
I'll regenerate the 32bit NUMA unification branch on top of it with
Yinghai's other patches and send pull request for x86/mm.

Thank you.

 arch/x86/mm/numa_64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: work/arch/x86/mm/numa_64.c
===================================================================
--- work.orig/arch/x86/mm/numa_64.c
+++ work/arch/x86/mm/numa_64.c
@@ -191,7 +191,7 @@ int __init numa_cleanup_meminfo(struct n
 		bi->end = min(bi->end, high);
 
 		/* and there's no empty block */
-		if (bi->start == bi->end) {
+		if (bi->start >= bi->end) {
 			numa_remove_memblk_from(i--, mi);
 			continue;
 		}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-01 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-01 10:45 [PATCH tip:x86/urgent] x86, NUMA: Fix empty memblk detection in numa_cleanup_meminfo() Tejun Heo
2011-05-01 16:53 ` Ingo Molnar
2011-05-01 17:12   ` [PATCH REPOST " Tejun Heo
2011-05-01 17:44     ` [tip:x86/urgent] " tip-bot for Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome