From: Tim Deegan <tim@xen.org>
To: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Cc: xudong.hao@intel.com, xiantao.zhang@intel.com,
Jan Beulich <jbeulich@suse.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 2/3] xen/p2m: Using INVALID_MFN instead of mfn_valid
Date: Thu, 16 Aug 2012 18:47:50 +0100 [thread overview]
Message-ID: <20120816174750.GA32339@ocelot.phlegethon.org> (raw)
In-Reply-To: <35799d4871cec6ffe122121e59d930fe.squirrel@webmail.lagarcavilla.org>
At 10:17 -0700 on 16 Aug (1345112267), Andres Lagar-Cavilla wrote:
> > max_mapped_pfn should be the highest entry that's even had a mapping in
> > the p2m. Its intent was to provide a fast path exit from p2m lookups in
> > the (at the time) common case where _emulated_ MMIO addresses were
> > higher than all the actual p2m mappings, and the cost of a failed lookup
> > (on 32-bit) was a page fault in the linear map. Also, at the time, the
> > p2m wasn't typed and we didn't support direct MMIO, so mfn_valid() was
> > equivalent to 'entry is present'.
> >
> > These days, I'm not sure how useful max_mapped_pfn is, since (a) for any
> > VM with >3GB RAM the emulated MMIO lookups are not avoided, and (b) on
> > 64-bit builds there's not pagefault for a failed lookup. Also it seems to
> > have been abused in a few places to do for() loops that touch every PFN
> > instead of just walking the tries. So I might get rid of it after 4.2
> > is out.
>
> max_mapped_pfn also helps keep XENMEM_maximum_gpfn O(1).
Ergh, true. With a little tidying up in the tree update code (to
eliminate empty nodes) it will still be O(1) - just walking
rightmost-first down a trie of fixed height. But that's a little
more work than I hoped for. :)
Tim.
next prev parent reply other threads:[~2012-08-16 17:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.10813.1345115327.1399.xen-devel@lists.xen.org>
2012-08-16 17:17 ` [PATCH 2/3] xen/p2m: Using INVALID_MFN instead of mfn_valid Andres Lagar-Cavilla
2012-08-16 17:47 ` Tim Deegan [this message]
2012-08-15 6:57 Xudong Hao
2012-08-15 9:21 ` Jan Beulich
2012-08-16 10:05 ` Hao, Xudong
2012-08-16 10:12 ` Jan Beulich
2012-08-16 10:31 ` Hao, Xudong
2012-08-16 10:41 ` Jan Beulich
2012-08-16 11:01 ` Tim Deegan
2012-08-16 19:14 ` Mukesh Rathor
-- strict thread matches above, loose matches on Subject: below --
2012-08-15 6:55 Xudong Hao
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=20120816174750.GA32339@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=andres@lagarcavilla.org \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xen.org \
--cc=xiantao.zhang@intel.com \
--cc=xudong.hao@intel.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).