public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] KVM: MMU: fix accessed bit set on prefault path
Date: Tue, 30 Nov 2010 21:20:59 +0200	[thread overview]
Message-ID: <20101130192059.GC2924@redhat.com> (raw)
In-Reply-To: <4CF54C4F.80901@cn.fujitsu.com>

On Wed, Dec 01, 2010 at 03:11:11AM +0800, Xiao Guangrong wrote:
> On 12/01/2010 02:38 AM, Gleb Natapov wrote:
> 
> >> It can't avoid the page to be evicted again since the page is marked accessed only
> >> when spte is droped or updated.
> > I still do not understand why are you disabling prefault for ept. Why
> > do you want to distinguish between actually accessed translations and
> > prefauls? What problem are you trying to fix?
> > 
> 
> Look at set_spte_track_bits() function:
> 
> 	if (!shadow_accessed_mask || old_spte & shadow_accessed_mask)
> 		kvm_set_pfn_accessed(pfn);
> 
> It's always mark the page accessed.
> 
> But prefault is the speculative path, the prefault address may not be
> accessed later(the apf process is killed). under this case, the page is
> not really accessed.
Firs of all if guest is PV the guest process cannot be killed. Second
why is it a problem that we marked pfn as accessed on speculative path?
What problem it causes especially since it is very likely that the page
will be accessed shortly anyway?

--
			Gleb.

  reply	other threads:[~2010-11-30 19:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30  9:34 [PATCH v3 1/3] KVM: MMU: rename 'no_apf' to 'prefault' Xiao Guangrong
2010-11-30  9:36 ` [PATCH v3 2/3] KVM: MMU: fix accessed bit set on prefault path Xiao Guangrong
2010-11-30 13:29   ` Gleb Natapov
2010-11-30 16:52     ` Xiao Guangrong
2010-11-30 17:50       ` Gleb Natapov
2010-11-30 18:15         ` Xiao Guangrong
2010-11-30 18:38           ` Gleb Natapov
2010-11-30 19:11             ` Xiao Guangrong
2010-11-30 19:20               ` Gleb Natapov [this message]
2010-12-01  2:20                 ` Xiao Guangrong
2010-12-01 20:42                   ` Marcelo Tosatti
2010-11-30  9:37 ` [PATCH v3 3/3] KVM: MMU: retry #PF for softmmu Xiao Guangrong
2010-12-02  1:19   ` Marcelo Tosatti
2010-12-02  3:44     ` Xiao Guangrong

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=20101130192059.GC2924@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiaoguangrong@cn.fujitsu.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