All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Eran Rom <eranr@il.ibm.com>
Cc: kvm@vger.kernel.org
Subject: Re: profiling virtio (blk in this case)
Date: Sun, 17 May 2009 23:37:22 +0300	[thread overview]
Message-ID: <4A107582.7050208@redhat.com> (raw)
In-Reply-To: <loom.20090514T152646-886@post.gmane.org>

Eran Rom wrote:
> The "Host<-->Guest" calls in virtio_blk (using the generic virtio kick/notify)
> are as follows:
>
> Guest->Host
> -----------
> do_virtlkb_request calls kick in the guest side causing handle_output to be
> called on the host side.
>
> Host->Guest
> -----------
> virtio_blk_rw_complete calls notify in the host side causing block_done to be
> called on the guest side
>
> My question has to do with the timing of the calls.
> Which would be the correct drawing
> 1. Overlapping:
> kick             |------------|
> handle_output             |------------|
> 2. Disjoint:
> kick             |------------|
> handle_output                    |------------|
>   

kick() competely contains handle_output().

> In other words:
> if I do
> g1 = get_cpu_cycles
> kick
> g2 = get_cpu_cycles
> and 
> h1 = get_cpu_cycles
> handle_output
> h2 = get_cpu_cycles
> would (g2-g1) + (h2-h2) count some cycles twice?
>   

h2-h1 would be counted twice.

> Same question for notify and block_done.
>   

Different answer.  The guest starts executing sometimes in the middle of 
the host notify function.

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


      reply	other threads:[~2009-05-17 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 16:09 profiling virtio (blk in this case) Eran Rom
2009-05-17 20:37 ` 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=4A107582.7050208@redhat.com \
    --to=avi@redhat.com \
    --cc=eranr@il.ibm.com \
    --cc=kvm@vger.kernel.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.