public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Zhao Forrest <forrest.zhao@gmail.com>
Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH 6/8] x86: KVM guest: hypercall batching
Date: Thu, 06 Mar 2008 09:11:05 +0200	[thread overview]
Message-ID: <47CF9909.8010402@qumranet.com> (raw)
In-Reply-To: <ac8af0be0803052026v6f5161d0ld413fbe939837860@mail.gmail.com>

Zhao Forrest wrote:
> Hi Avi,
>
> After reading the patch, I think the hypercall batching mechanism is as follows:
> 1 defer the MMU-related operations and buffer them in
> kvm_para_state->mmu_queue[]
> 2 during the flush period, kvm_mmu_op() is called to flush operations
> in kvm_para_state->mmu_queue[]
> 3 kvm_mmu_op() generate a hypercall for each operation in
> kvm_para_state->mmu_queue[]; thus trigger a context switch from guest
> mode to kernel mode for each operation.
>
> My question is: Is it possible to only generate a single
> hypercall(thus a single context switch) for all buffered MMU
> operations in kvm_para_state->mmu_queue[]? This way we could further
> reduce overhead, am I right?
> BTW. I don't have a deep understanding of KVM. So this is just a
> question out of my curiosity.
>
>   

mmu_queue_flush() is called once per batch, so we only have one 
hypercall per batch (at least if the data doesn't exceed 512 bytes).

-- 
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-03-06  7:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-02 16:31 [PATCH 6/8] x86: KVM guest: hypercall batching Avi Kivity
2008-03-06  4:26 ` Zhao Forrest
2008-03-06  7:11   ` Avi Kivity [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=47CF9909.8010402@qumranet.com \
    --to=avi@qumranet.com \
    --cc=forrest.zhao@gmail.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --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