From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2itO-0005ah-8o for qemu-devel@nongnu.org; Fri, 16 Apr 2010 06:35:22 -0400 Received: from [140.186.70.92] (port=48987 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2itJ-0005a5-US for qemu-devel@nongnu.org; Fri, 16 Apr 2010 06:35:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2itB-0007il-3Y for qemu-devel@nongnu.org; Fri, 16 Apr 2010 06:35:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29164) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2it5-0007hi-4g for qemu-devel@nongnu.org; Fri, 16 Apr 2010 06:35:08 -0400 Message-ID: <4BC83D4F.8000703@redhat.com> Date: Fri, 16 Apr 2010 12:34:55 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [RfC PATCH 08/11] spice: add qxl device References: <690188359.186761271413099506.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> In-Reply-To: <690188359.186761271413099506.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Blue Swirl , qemu-devel@nongnu.org, rth@twiddle.net On 04/16/10 12:18, Paolo Bonzini wrote: >>> I'd just use __sync_fetch_and_or here. >> >> Good idea. I think we can zap the memory barrier and fix a small race >> while being at it, see the incremental fix below. > > Not sure about the memory barrier semantics of __sync_* (rth?), but > besides that the patch seems like a good idea. I think a memory barrier isn't needed there. We don't touch anything shared beside int_pending which is only accessed using the sync op (after applying the patch). cheers, Gerd