From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH 0/3][IA64] Accelerate IDE PIO on HVM/IA64 Date: Tue, 27 Feb 2007 09:51:18 -0700 Message-ID: <1172595078.5658.11.camel@lappy> References: <200702270850.l1R8oeK3019985@bx604.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200702270850.l1R8oeK3019985@bx604.sky.yk.fujitsu.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kouya SHIMURA Cc: xen-devel@lists.xensource.com, xen-ia64-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, 2007-02-27 at 18:34 +0900, Kouya SHIMURA wrote: > Hi, > > This set of patches remarkably accelerates IDE PIO on HVM/IA64. > I got a throughput of 2.11MB/sec in disk read performance. > Without it, it was only 64kB/sec. > > I posted the prototype once. > http://lists.xensource.com/archives/html/xen-devel/2006-12/msg00077.html > > The basic idea is to add a buffering mechanism in a hypervisor. > I know this approach is not sophisticated. But there is no other > good way in IA64 which has no string instructions like x86's. This seems like a pretty good performance increase for only a single page of domain overhead in Xen. My main concern would be that we maintain correctness. It is writing out the dirty buffer before the domain shuts down, right? I'm guessing the flush probably does that. Looks like a bug here though: +static inline void +buffered_pio_write(IDEState *s, uint32_t addr, int size) +{ + struct pio_buffer *piobuf = piobuf_by_addr(addr); + uint32_t data_end; + + if (!piobuf) + return; + buffered_pio_flush(piobuf); + data_end = s->data_end - s->data_ptr - size; + if (data_end <= 0) + data_end = 0; data_end is unsigned, so it will never be < 0. Same problem on the read func. Thanks, Alex -- Alex Williamson HP Open Source & Linux Org.