All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Marcelo Tosatti <marcelo@kvack.org>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [patch 3/5] KVM: hypercall batching (v2)
Date: Fri, 22 Feb 2008 09:10:47 +0200	[thread overview]
Message-ID: <47BE7577.6000305@qumranet.com> (raw)
In-Reply-To: <20080221193143.GA32580@dmt>

Marcelo Tosatti wrote:
> On Thu, Feb 21, 2008 at 08:30:04PM +0200, Avi Kivity wrote:
>   
>>> Perhaps you want to move that enforcement to the host.
>>>
>>> This allows batching of future hypercalls (if appropriate) to be easy.
>>>
>>>  
>>>       
>> I'm still uneasy about it, though I have no rational reasons left now.
>>
>> Oh, there is one: with a MMU_OP hypercall you can take the mmu spinlock 
>> once per batch (dropping it once in a while to let another vcpu make 
>> progress or to inject an interrupt).
>>     
>
> emulator_write_phys() needs to do blocking work for each pte
> (mmu_guess_page_from_pte), so that optimization would need quite some
> work (separate mmu_guess_page_from_pte from kvm_mmu_pte_write).
>
> And you can do this optimization even without MMU_OP, just check in
> advance how many operations will take the mmu lock, do the non-blocking
> part of them, and then manipulate the mmu lock protected shadow data.
>
> Also, holding the spinlock for a longer period is not necessarily an
> improvement (with the slots_lock it clearly is because there is no write
> contention).
>
>   

Yes, you are right.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  reply	other threads:[~2008-02-22  7:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 19:47 [patch 0/5] KVM paravirt MMU updates and cr3 caching (v2) Marcelo Tosatti
2008-02-20 19:47 ` [patch 1/5] KVM: add basic paravirt support (v2) Marcelo Tosatti
2008-02-21 15:38   ` Avi Kivity
2008-02-21 15:55     ` Marcelo Tosatti
2008-02-21 18:31       ` Avi Kivity
2008-02-20 19:47 ` [patch 2/5] KVM: hypercall based pte updates and TLB flushes (v2) Marcelo Tosatti
2008-02-21 15:43   ` Avi Kivity
2008-02-20 19:47 ` [patch 3/5] KVM: hypercall batching (v2) Marcelo Tosatti
2008-02-21 15:52   ` Avi Kivity
2008-02-21 18:05     ` Marcelo Tosatti
2008-02-21 18:30       ` Avi Kivity
2008-02-21 19:31         ` Marcelo Tosatti
2008-02-22  7:10           ` Avi Kivity [this message]
2008-02-20 19:47 ` [patch 4/5] KVM: ignore zapped root pagetables (v2) Marcelo Tosatti
2008-02-21 15:57   ` Avi Kivity
2008-02-20 19:47 ` [patch 5/5] KVM: VMX cr3 cache support (v2) Marcelo Tosatti

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=47BE7577.6000305@qumranet.com \
    --to=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=marcelo@kvack.org \
    /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.