From: Tejun Heo <tj@kernel.org>
To: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH tip:x86/urgent] x86, NUMA: Fix empty memblk detection in numa_cleanup_meminfo()
Date: Sun, 1 May 2011 12:45:55 +0200 [thread overview]
Message-ID: <20110501104555.GN29280@htj.dyndns.org> (raw)
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;
}
next reply other threads:[~2011-05-01 10:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-01 10:45 Tejun Heo [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110501104555.GN29280@htj.dyndns.org \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=x86@kernel.org \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®