From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] MMIO: Make coalesced mmio use a device per zone Date: Wed, 20 Jul 2011 11:24:21 +0300 Message-ID: <4E2690B5.9050206@redhat.com> References: <1311063011-4430-1-git-send-email-levinsasha928@gmail.com> <4E2544F3.9030203@redhat.com> <1311069182.9174.1.camel@lappy> <4E255584.1030003@redhat.com> <1311070673.9174.4.camel@lappy> <4E255D44.8000107@redhat.com> <4E25BB6B.90907@siemens.com> <4E25BC46.1040200@redhat.com> <4E25BD8D.1030509@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Sasha Levin , "kvm@vger.kernel.org" , Marcelo Tosatti To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32844 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885Ab1GTIY2 (ORCPT ); Wed, 20 Jul 2011 04:24:28 -0400 In-Reply-To: <4E25BD8D.1030509@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/19/2011 08:23 PM, Jan Kiszka wrote: > On 2011-07-19 19:17, Avi Kivity wrote: > > On 07/19/2011 08:14 PM, Jan Kiszka wrote: > >> > >> Another improvement - unfortunately less transparent for user space - > >> would be to overcome the single ring buffer that forces us to hold a > >> central lock in user space while processing the entries. We rather need > >> per-device rings. While waiting for coalesced VGA MMIO being processed, > >> way too many kittens are killed. > >> > >> I have this on our agenda, but I wouldn't be disappointed as well if > >> someone else is faster. > > > > The socket mmio would have accomplished this as well. > > I haven't followed the outcome in all details - is that approach dead > due to its complexity? > > > One thing to > > beware of is to preserve correctness: > > > > 1) write to 0xa0000 (queued) > > 2) write to 0xa0002 (queued) > > 3) remap 0xa0000 region (executed) > > Obviously, there must be 3a) here: drain all affected queues. How do you implement this 3a, if your consumers are outside the main process? I guess you could have an additional synchonize API (for in-kernel consumers) or RPC (for external process consumers), but then this is no longer a simple API. > > 4) write to 0xa000 (queued) > > 5) drain queue > > > > writes 1 and 2 go to the wrong place. > > -- error compiling committee.c: too many arguments to function