From: David Gibson <david@gibson.dropbear.id.au>
To: William Lee Irwin <wli@holomorphy.com>
Cc: Andrew Morton <akpm@osdl.org>,
linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Hugepages need clear_user_highpage() not clear_highpage()
Date: Mon, 6 Feb 2006 13:18:53 +1100 [thread overview]
Message-ID: <20060206021853.GC10708@localhost.localdomain> (raw)
When hugepages are newly allocated to a file in mm/hugetlb.c, we clear
them with a call to clear_highpage() on each of the subpages. We
should be using clear_user_highpage(): on powerpc, at least,
clear_highpage() doesn't correctly mark the page as icache dirty so if
the page is executed shortly after it's possible to get strange
results.
This is a bugfix and should go into 2.6.16.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Index: working-2.6/mm/hugetlb.c
===================================================================
--- working-2.6.orig/mm/hugetlb.c 2006-02-06 12:58:07.000000000 +1100
+++ working-2.6/mm/hugetlb.c 2006-02-06 12:58:19.000000000 +1100
@@ -107,7 +107,7 @@ struct page *alloc_huge_page(struct vm_a
set_page_count(page, 1);
page[1].mapping = (void *)free_huge_page;
for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); ++i)
- clear_highpage(&page[i]);
+ clear_user_highpage(&page[i], addr);
return page;
}
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next reply other threads:[~2006-02-06 2:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 2:18 David Gibson [this message]
2006-02-06 8:19 ` Hugepages need clear_user_highpage() not clear_highpage() William Lee Irwin III
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=20060206021853.GC10708@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=wli@holomorphy.com \
/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