All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Laurent Vivier <Laurent.Vivier@bull.net>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/2] kvm: Batch writes to MMIO
Date: Wed, 23 Apr 2008 18:04:28 +0300	[thread overview]
Message-ID: <480F4FFC.7070909@qumranet.com> (raw)
In-Reply-To: <1208962748.4281.28.camel@frecb07144>

Laurent Vivier wrote:
>>>   
>>>       
>> This breaks ordering on smp guests. batch_data needs to be a kvm thing, 
>> not a vcpu thing, and locked, of course.
>>     
>
> - is ordering between vcpu important when we already delay operations ?
>   

Yes.  Ordering is very different from delaying.  Also, we will only 
delay writes which don't matter (those that simply latch something into 
a register, which is later read).

> - using vcpu avoids the lock
>   

Correctness beats performance

> - Why PIO (pio_data) are vcpu things and not kvm things, then ?
>   

pio batching is used for just a single instruction that can work with 
batches (ins/outs), so a guest can't expect to see partial output.

With mmio, you can have

1. mmio
2. raise flag in shared memory
3. other vcpu sees flag, does mmio
4. spin-wait for ack from other vcpu
5. mmio

You can't do that with ins/outs.

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


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-04-23 15:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 13:07 [PATCH 0/2] Batch writes to MMIO Laurent Vivier
2008-04-23 13:07 ` [PATCH 1/2] kvm: " Laurent Vivier
2008-04-23 13:07   ` [PATCH 2/2] kvm-userspace: " Laurent Vivier
2008-04-23 14:31   ` [PATCH 1/2] kvm: " Avi Kivity
2008-04-23 14:59     ` Laurent Vivier
2008-04-23 15:04       ` Avi Kivity [this message]
2008-04-23 16:53   ` Anthony Liguori
2008-04-23 14:05 ` [PATCH 0/2] " Avi Kivity
2008-04-23 14:22   ` Laurent Vivier
2008-04-23 14:40     ` Avi Kivity
2008-04-23 15:10       ` Anthony Liguori
2008-04-23 15:12         ` Avi Kivity
2008-04-23 15:47           ` Anthony Liguori
2008-04-23 17:13             ` Avi Kivity
2008-04-23 16:24         ` Laurent Vivier
2008-04-23 16:25           ` Avi Kivity
2008-04-23 16:41             ` Laurent Vivier
2008-04-23 16:48               ` Anthony Liguori
2008-04-23 16:51                 ` Avi Kivity
2008-04-23 18:54                 ` Laurent Vivier

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=480F4FFC.7070909@qumranet.com \
    --to=avi@qumranet.com \
    --cc=Laurent.Vivier@bull.net \
    --cc=kvm-devel@lists.sourceforge.net \
    /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.