public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Gleb Natapov <gleb@redhat.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: Wed, 01 Dec 2010 03:11:11 +0800	[thread overview]
Message-ID: <4CF54C4F.80901@cn.fujitsu.com> (raw)
In-Reply-To: <20101130183833.GB2924@redhat.com>

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.

  reply	other threads:[~2010-11-30 19:11 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 [this message]
2010-11-30 19:20               ` Gleb Natapov
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=4CF54C4F.80901@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.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