From: William Lee Irwin III <wli@holomorphy.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>,
raybry@sgi.com, linux-kernel@vger.kernel.org
Subject: Re: Hugepages demand paging V1 [2/4]: set_huge_pte() arch updates
Date: Fri, 22 Oct 2004 08:42:19 -0700 [thread overview]
Message-ID: <20041022154219.GY17038@holomorphy.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0410220829200.7868@schroedinger.engr.sgi.com>
On Fri, 22 Oct 2004, William Lee Irwin III wrote:
>> What's described above is not what the patch implements. The patch is
>> calling update_mmu_cache() in a loop on all the virtual base pages of a
>> virtual hugepage, which won't help at all, as it doesn't understand how
>> to find the hugepages regardless of virtual address. AFAICT code to
>> actually do the equivalent of update_mmu_cache() on hugepages most
>> likely involves privileged instructions and perhaps digging around some
>> cpu-specific data structures (e.g. the natively architected pagetables
>> bearing no resemblance to Linux') for almost every non-x86 architecture.
On Fri, Oct 22, 2004 at 08:32:34AM -0700, Christoph Lameter wrote:
> The looping is architecture specific. But you are right for the
> architectures where I simply did the loop that is wrong. The address given
> needs to be correctly calculated which it is not.
> Again this is arch specific stuff and can be done as needed for any
> architecture. There is no intend to generalize this.
The "model", as it were, for pagetable updats, is a 3-stage model:
(1) prepare
(2) update
(3) commit
update_mmu_cache() is stage (3). Linux' software pagetable
modifications are step (2). Generally, architectures are trying to fold
stages (2) and (3) together in set_huge_pte(), so update_mmu_cache() is
not so much of an issue for them (and it's actually incorrect to do
this multiple times or without the architectures' awareness of hugepages
in update_mmu_cache() and so on). To completely regularize the hugetlb
case, merely move the commitment to cpu-native structures or other TLB
insertion done within set_huge_pte() to a new case in update_mmu_cache()
for large pages.
What is in fact far more pressing is flush_dcache_page(), without a
correct implementation of which for hugetlb, user-visible data
corruption follows.
-- wli
next prev parent reply other threads:[~2004-10-22 15:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B05667366EE6204181EABE9C1B1C0EB501F2ADFB@scsmsx401.amr.corp.intel.com>
2004-10-22 4:55 ` Hugepages demand paging V1 [0/4]: Discussion and overview Christoph Lameter
2004-10-22 4:56 ` Hugepages demand paging V1 [1/4]: demand paging core Christoph Lameter
2004-10-22 10:47 ` William Lee Irwin III
2004-10-22 15:33 ` Christoph Lameter
2004-10-22 4:57 ` Hugepages demand paging V1 [2/4]: set_huge_pte() arch updates Christoph Lameter
2004-10-22 10:37 ` William Lee Irwin III
2004-10-22 15:32 ` Christoph Lameter
2004-10-22 15:42 ` William Lee Irwin III [this message]
2004-10-22 20:29 ` Christoph Lameter
2004-10-22 20:45 ` William Lee Irwin III
2004-10-22 20:49 ` Christoph Lameter
2004-10-22 4:58 ` Hugepages demand paging V1 [3/4]: Overcommit handling Christoph Lameter
2004-10-22 10:28 ` Andrew Morton
2004-10-22 15:08 ` Christoph Lameter
2004-10-22 15:32 ` Chen, Kenneth W
2004-10-22 10:49 ` William Lee Irwin III
2004-10-22 11:01 ` Christoph Hellwig
2004-10-22 11:12 ` William Lee Irwin III
2004-10-22 11:16 ` Christoph Hellwig
2004-10-22 11:21 ` William Lee Irwin III
2004-10-22 11:23 ` William Lee Irwin III
2004-10-22 4:58 ` Hugepages demand paging V1 [4/4]: Numa patch Christoph Lameter
2004-10-22 6:05 ` Chen, Kenneth W
2004-10-22 11:00 ` William Lee Irwin III
2004-10-22 19:37 ` Christoph Lameter
2004-10-22 19:40 ` William Lee Irwin III
2004-10-25 21:25 ` Chen, Kenneth W
2004-10-25 21:52 ` William Lee Irwin III
2004-10-25 21:55 ` William Lee Irwin III
2004-10-25 21:05 ` Chen, Kenneth W
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=20041022154219.GY17038@holomorphy.com \
--to=wli@holomorphy.com \
--cc=clameter@sgi.com \
--cc=kenneth.w.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=raybry@sgi.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
Powered by JetHome