From: Dave McCracken <dcm@mccr.org>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Xen Developers List <xen-devel@lists.xensource.com>
Subject: Re: [Linux PATCH] Fix to hugepages to work around new PWT handling
Date: Thu, 24 Jun 2010 17:38:47 -0500 [thread overview]
Message-ID: <201006241738.47925.dcm@mccr.org> (raw)
In-Reply-To: <4C232DE1.50008@goop.org>
On Thursday, June 24, 2010, Jeremy Fitzhardinge wrote:
> > Um, this is the upper level code. The entire purpose of make_huge_pte is
> > to construct a present huge pte from page and pgprot. The problem is
> > that the original code makes the pte, then sets the present bit via
> > pte_mkhuge(). This means the Xen-specific macro that triggers on
> > present is misled and doesn't do the pfn_to_mfn(). Without this patch
> > hugepages is handing pfns to the hypervisor to map instead of mfns.
> >
> >
>
> In principle, setting present should cause the pte to be converted from
> pfn to mfn, but I don't think that ever happens with normal ptes (since
> non-present ptes contain swap info). But I don't see where a huge pte
> gets present set; pte_mkhuge itself doesn't do anything except set PSE.
Wow. I just dug through the code. The landscape has sure changed since the
last time I followed this path.
It used to be that vma->vm_page_prot only contained the various read/write
flags for that vma. At that time pte_mkhuge() did in fact add _PAGE_PRESENT|
_PAGE_PSE to the pte.
Now it appears that vma->vm_page_prot does include _PAGE_PRESENT in all its
various states. So this part of the patch is in fact unnecessary.
It's what I get for not rechecking my facts to be sure they haven't changed.
Sorry.
Dave McCracken
Oracle Corp.
prev parent reply other threads:[~2010-06-24 22:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 14:02 [Linux PATCH] Fix to hugepages to work around new PWT handling Dave McCracken
2010-06-09 18:21 ` Jeremy Fitzhardinge
2010-06-09 18:35 ` Dave McCracken
2010-06-09 18:54 ` Jeremy Fitzhardinge
2010-06-09 19:26 ` Dave McCracken
2010-06-24 10:05 ` Jeremy Fitzhardinge
2010-06-24 22:38 ` Dave McCracken [this message]
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=201006241738.47925.dcm@mccr.org \
--to=dcm@mccr.org \
--cc=jeremy@goop.org \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).