From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGE6O-0002kC-Pk for qemu-devel@nongnu.org; Tue, 18 Oct 2011 14:09:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGE6N-0001yc-Fr for qemu-devel@nongnu.org; Tue, 18 Oct 2011 14:09:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGE6N-0001yY-4o for qemu-devel@nongnu.org; Tue, 18 Oct 2011 14:09:23 -0400 Date: Tue, 18 Oct 2011 20:06:40 +0200 From: Alon Levy Message-ID: <20111018180640.GP3233@bow.tlv.redhat.com> References: <4E859A72.9040007@siemens.com> <4E9D8698.3060608@redhat.com> <4E9D87B0.5070009@siemens.com> <4E9D884B.30309@redhat.com> <4E9D88C9.1010804@siemens.com> <4E9D8D81.308@redhat.com> <4E9DAC02.4040208@redhat.com> <4E9DAE35.4010003@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E9DAE35.4010003@siemens.com> Subject: Re: [Qemu-devel] [PATCH 1/2] Move graphic-related coalesced MMIO flushes to affected device models List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , David Gibson , Avi Kivity , qemu-devel On Tue, Oct 18, 2011 at 06:49:57PM +0200, Jan Kiszka wrote: > On 2011-10-18 18:40, Avi Kivity wrote: > > On 10/18/2011 04:30 PM, Avi Kivity wrote: > >> This takes a while to reproduce, let me talk to gdb for a bit. > >> > > > > a vcpu exit causes kvm_flush_coalesced_mmio_buffer() to run, which does > > a bitblt, which is cirrus_do_copy(), which goes to vga_hw_update, which > > Why does it have to do vga_hw_update? Why can't it set some flag for the > next requested screen update or so? Just thinking, haven't looked at the > code yet. bottomhalf? > > Do you think that only cirrus is affected by this pattern? > > > does vga_update_display(), which calls > > qemu_flush_coalesced_mmio_buffer(), which is not reentrant. > > > > It's easy to make qemu_flush_coalesced_mmio_buffer reentrant: > > > > if (s->coalesced_flush_in_progress) { > > return; > > } > > > > it isn't very pretty and is also a lie. Other ideas? > > > > I'll probably commit this soon to avoid the regression, to be replaced > > by a better fix when we find it. > > > > Agreed. Unless we can avoid that recursion at devices level, there is > likely no alternative. > > Jan > > -- > Siemens AG, Corporate Technology, CT T DE IT 1 > Corporate Competence Center Embedded Linux >