From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "Jiang, Yunhong" <yunhong.jiang@intel.com>,
Tim Deegan <Tim.Deegan@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH]Add a flag for shadow pages
Date: Wed, 04 Mar 2009 09:06:52 +0000 [thread overview]
Message-ID: <C5D3F52C.411C%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <E2263E4A5B2284449EEBD0AAB751098401C7C9DCFC@PDSMSX501.ccr.corp.intel.com>
On 04/03/2009 08:46, "Jiang, Yunhong" <yunhong.jiang@intel.com> wrote:
> Currently we don't know that a page is a shadow page unless we are in shadow
> handler. This cause error when we try to get the page owner for the shadow
> page, this snippet add a flag to it.
>
> signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
You only actually use your new flag in a BUG_ON, where it might avoid false
negatives but hardly looks essential. Your other changes limit count_info
checks to PGC_page_table|PGC_count_info which might be an improvement (I'm
sure Tim or Gianluca can say) but they're existing fields.
> I'm not quite sure if the sh_put_ref() and sh_rm_write_access_from_sl1p() is
> try to checking a page is shadow page (I assume so), because when a anonymous
> page is allocated, the count_info is also 0 (like HVM's vlapic page), so I
> change it like this patch (checking PGC_count_mask is 0). Since comments in
> sh_hash_audit_bucket() has stated clearly it is to check if it is shdow, so I
> replace it with test_bit().
>
> Also, do we need checking in page_get_owner() also?
Usually gets used where we already get_page()ed or are about to get_page().
Most Xen code knows that page uses can change under its feet unless it grabs
a reference. So extra checks in page_get_owner() are probably rather
pointless.
-- Keir
next prev parent reply other threads:[~2009-03-04 9:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 8:46 [PATCH]Add a flag for shadow pages Jiang, Yunhong
2009-03-04 9:06 ` Keir Fraser [this message]
2009-03-04 9:17 ` Jiang, Yunhong
2009-03-04 9:22 ` Keir Fraser
2009-03-04 9:28 ` Jiang, Yunhong
2009-03-04 9:56 ` Keir Fraser
2009-03-04 11:57 ` Keir Fraser
2009-03-04 12:13 ` Tim Deegan
2009-03-04 13:19 ` Keir Fraser
2009-03-04 14:30 ` Keir Fraser
2009-03-04 16:01 ` Jiang, Yunhong
2009-03-04 16:32 ` Gianluca Guida
2009-03-05 2:41 ` Jiang, Yunhong
2009-03-04 16:45 ` Keir Fraser
2009-03-04 9:20 ` Keir Fraser
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=C5D3F52C.411C%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=Tim.Deegan@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
--cc=yunhong.jiang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.