WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Buffered IO for IO?

To: Keir Fraser <keir@xxxxxxxxxxxxx>,"Zulauf, John" <john.zulauf@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Buffered IO for IO?
From: Mats Petersson <mats@xxxxxxxxxxxxxxxxx>
Date: Sat, 21 Jul 2007 10:50:04 +0100
Delivery-date: Tue, 24 Jul 2007 08:59:09 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:x-mailer:date:to:from:subject:in-reply-to:references:mime-version:content-type:sender:message-id; b=ulRRx0A3c7AAXrZD2MzGghL/g8tmw4x/XYzjNJ5dZWRLUCNNdgtjFTZXQ8kVN2PUu4QhU9JKvHmLvid7Gwde8I2phtLognCRRALSXc/qt+jHWKiefd2WXgzE3unbMjBqJJzUADyipwZn5gHosbrnT/QsuLneQ59O9tEevFiZ9hU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:x-mailer:date:to:from:subject:in-reply-to:references:mime-version:content-type:sender:message-id; b=f8+73KOFjFP9Ly60JPmPyGYftXOO/lmTPAm3lD8iHnRO8GtiUStHzja2fC8jhQ4qMUD36N9AzEmau3WIk5IU+Tdkl/xNa8dWHeTovB4t6Nre95Te94rN4G+Wdo8L3kni4lKfJV1+2gCYQ3P3p9PSilbrto+tAIp9gnyVtM3EJr0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2C79413.B327%keir@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BD262A443AD428499D90AF8368C4528D8A166C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C2C79413.B327%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
At 10:44 21/07/2007, Keir Fraser wrote:



On 20/7/07 22:33, "Zulauf, John" <john.zulauf@xxxxxxxxx> wrote:

> Has anyone experimented with adding Buffered IO support for "out"
> instructions?  Currently, the buffered io pages is only used for mmio
> writes (and then only to vga space).  It seems quite straight-forward to
> add.

Is it safe to buffer, and hence arbitrarily delay, any I/O port write?


That would depend on the actual port - some are OK to delay, others are not. E.g. OUT to the serial port FIFO would be OK to delay for a bit, but the next IN from the status register would require preceeding OUT's to be flushed (and processed) before the IN can be correctly assessed - as otherwise the serial port may look like it's got an infinite FIFO, and/or data has already been sent, which is likely to NOT be the case.

To be perfect, you'd need a separate set of rules for each type of device, but I think it can be simplified by a "OUTs must be processed before INs can be processed" - so a long stream of OUT instructions could be batched up, but as soon as an IN happens, the batched OUTs will need to be processed.

How much there is to gain from this would be relatively easy to asses by counting the number of OUT between each IN - I suspect that there's a few OUTs per IN, so there would be some gain to just return back to the guest after an OUT.

The real trouble, of course, comes if there are devices that use a mixture of IOIO and MMIO, where a IOIO is used to send data, and status is read from MMIO... This would complicate matters by adding a rule of "MMIO read must flush batched OUT". The only suspect device I can think of here is a IDE controller with DMA capabilities - I haven't looked at those, so I don't know if they mix IOIO and MMIO.

--
Mats


 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>