* [x86] Stricter check in follow_huge_addr()
@ 2008-03-27 4:03 Christoph Lameter
2008-03-27 8:13 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Lameter @ 2008-03-27 4:03 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Jeremy Fitzhardinge
From: Christoph Lameter <clameter@sgi.com>
Subject: Compound Pages: Stricter check in follow_huge_addr
The first page of the compound page is determined in follow_huge_addr()
but then PageCompound() only checks if the page is part of a compound page.
PageHead() allows checking if this is indeed the first page of the
compound.
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
arch/x86/mm/hugetlbpage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.25-rc5-mm1/arch/x86/mm/hugetlbpage.c
===================================================================
--- linux-2.6.25-rc5-mm1.orig/arch/x86/mm/hugetlbpage.c 2008-03-26 20:43:56.796667401 -0700
+++ linux-2.6.25-rc5-mm1/arch/x86/mm/hugetlbpage.c 2008-03-26 20:44:55.526669888 -0700
@@ -178,7 +178,7 @@ follow_huge_addr(struct mm_struct *mm, u
page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)];
- WARN_ON(!PageCompound(page));
+ WARN_ON(!PageHead(page));
return page;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [x86] Stricter check in follow_huge_addr()
2008-03-27 4:03 [x86] Stricter check in follow_huge_addr() Christoph Lameter
@ 2008-03-27 8:13 ` Ingo Molnar
2008-03-27 18:43 ` Christoph Lameter
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2008-03-27 8:13 UTC (permalink / raw)
To: Christoph Lameter; +Cc: linux-kernel, Jeremy Fitzhardinge
* Christoph Lameter <clameter@sgi.com> wrote:
> From: Christoph Lameter <clameter@sgi.com>
> Subject: Compound Pages: Stricter check in follow_huge_addr
>
> The first page of the compound page is determined in
> follow_huge_addr() but then PageCompound() only checks if the page is
> part of a compound page. PageHead() allows checking if this is indeed
> the first page of the compound.
thanks Christoph, applied.
btw., what type of real-life problem does this address? Did this trigger
somewhere? (if yes, do you have any URLs i could put into the
changelog?)
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [x86] Stricter check in follow_huge_addr()
2008-03-27 8:13 ` Ingo Molnar
@ 2008-03-27 18:43 ` Christoph Lameter
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Lameter @ 2008-03-27 18:43 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Jeremy Fitzhardinge
On Thu, 27 Mar 2008, Ingo Molnar wrote:
> btw., what type of real-life problem does this address? Did this trigger
> somewhere? (if yes, do you have any URLs i could put into the
> changelog?)
Does not address any issues. I just saw it on review while thinking about
how to optimize checks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-27 18:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-27 4:03 [x86] Stricter check in follow_huge_addr() Christoph Lameter
2008-03-27 8:13 ` Ingo Molnar
2008-03-27 18:43 ` Christoph Lameter
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®