public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: Gleb Natapov <gleb@redhat.com>,
	Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
	avi.kivity@gmail.com, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH v3 00/15] KVM: MMU: fast zap all shadow pages
Date: Mon, 22 Apr 2013 20:02:34 -0300	[thread overview]
Message-ID: <20130422230233.GA3337@amt.cnet> (raw)
In-Reply-To: <20130422224553.b4dd57075cc7e32aacaadc01@gmail.com>

On Mon, Apr 22, 2013 at 10:45:53PM +0900, Takuya Yoshikawa wrote:
> On Mon, 22 Apr 2013 15:39:38 +0300
> Gleb Natapov <gleb@redhat.com> wrote:
> 
> > > > Do not want kvm_set_memory (cases: DELETE/MOVE/CREATES) to be
> > > > suspectible to:
> > > > 
> > > > vcpu 1    		|	kvm_set_memory
> > > > create shadow page 		
> > > > 				nuke shadow page
> > > > create shadow page
> > > > 				nuke shadow page
> > > > 
> > > > Which is guest triggerable behavior with spinlock preemption algorithm.
> > > 
> > > Not only guest triggerable as in the sense of a malicious guest, 
> > > but condition above can be induced by host workload with non-malicious
> > > guest system.
> > > 
> > Is the problem that newly created shadow pages are immediately zapped?
> > Shouldn't generation number/kvm_mmu_zap_all_invalid() idea described here
> > https://lkml.org/lkml/2013/4/22/111 solve this?
> 
> I guess so.  That's what Avi described when he tried to achieve
> lockless TLB flushes.  Mixing that idea with Xiao's approach will
> achieve reasonably nice performance, I think.

Yes.

> Various improvements should be added later on top of that if needed.
> 
> > > Also kvm_set_memory being relatively fast with huge memory guests
> > > is nice (which is what Xiaos idea allows).
> 
> I agree with this point.  But if so, it should be actually measured on
> such guests, even if the algorithm looks promising.

Works for me.

      reply	other threads:[~2013-04-22 23:02 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16  6:32 [PATCH v3 00/15] KVM: MMU: fast zap all shadow pages Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 01/15] KVM: x86: clean up and optimize for kvm_arch_free_memslot Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 02/15] KVM: fold kvm_arch_create_memslot into kvm_arch_prepare_memory_region Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 03/15] KVM: x86: do not reuse rmap when memslot is moved Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 04/15] KVM: MMU: abstract memslot rmap related operations Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 05/15] KVM: MMU: allow per-rmap operations Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 06/15] KVM: MMU: allow concurrently clearing spte on remove-only pte-list Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 07/15] KVM: MMU: introduce invalid rmap handlers Xiao Guangrong
2013-04-17 23:38   ` Marcelo Tosatti
2013-04-18  3:15     ` Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 08/15] KVM: MMU: allow unmap invalid rmap out of mmu-lock Xiao Guangrong
2013-04-18 11:00   ` Gleb Natapov
2013-04-18 11:22     ` Xiao Guangrong
2013-04-18 11:38       ` Gleb Natapov
2013-04-18 12:10         ` Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 09/15] KVM: MMU: introduce free_meslot_rmap_desc_nolock Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 10/15] KVM: x86: introduce memslot_set_lpage_disallowed Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 11/15] KVM: MMU: introduce kvm_clear_all_lpage_info Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 12/15] KVM: MMU: fast invalid all shadow pages Xiao Guangrong
2013-04-18  0:05   ` Marcelo Tosatti
2013-04-18  4:00     ` Xiao Guangrong
2013-04-18 13:03       ` Marcelo Tosatti
2013-04-18 13:29         ` Marcelo Tosatti
2013-04-18 15:20           ` Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 13/15] KVM: x86: use the fast way to invalid all pages Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 14/15] KVM: move srcu_read_lock/srcu_read_unlock to arch-specified code Xiao Guangrong
2013-04-16  6:32 ` [PATCH v3 15/15] KVM: MMU: replace kvm_zap_all with kvm_mmu_invalid_all_pages Xiao Guangrong
2013-04-18  0:08   ` Marcelo Tosatti
2013-04-18  4:03     ` Xiao Guangrong
2013-04-20 17:18       ` Marcelo Tosatti
2013-04-21  6:59         ` Xiao Guangrong
2013-04-21 13:03 ` [PATCH v3 00/15] KVM: MMU: fast zap all shadow pages Gleb Natapov
2013-04-21 14:09   ` Xiao Guangrong
2013-04-21 15:24     ` Marcelo Tosatti
2013-04-22  2:50       ` Xiao Guangrong
2013-04-22  9:21     ` Gleb Natapov
2013-04-23  0:19       ` Xiao Guangrong
2013-04-23  6:28         ` Gleb Natapov
2013-04-23  7:20           ` Xiao Guangrong
2013-04-23  7:33             ` Gleb Natapov
2013-04-21 15:27   ` Marcelo Tosatti
2013-04-21 15:35     ` Marcelo Tosatti
2013-04-22 12:39       ` Gleb Natapov
2013-04-22 13:45         ` Takuya Yoshikawa
2013-04-22 23:02           ` Marcelo Tosatti [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=20130422230233.GA3337@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi.kivity@gmail.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=takuya.yoshikawa@gmail.com \
    --cc=xiaoguangrong@linux.vnet.ibm.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