From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzVi9-00029E-9Q for qemu-devel@nongnu.org; Fri, 02 Sep 2011 11:31:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzVi7-0000D9-W4 for qemu-devel@nongnu.org; Fri, 02 Sep 2011 11:31:17 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:49154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzVi7-0000Cx-Nf for qemu-devel@nongnu.org; Fri, 02 Sep 2011 11:31:15 -0400 Received: by iabz25 with SMTP id z25so3597278iab.4 for ; Fri, 02 Sep 2011 08:31:14 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E60F6BD.4090800@redhat.com> Date: Fri, 02 Sep 2011 17:31:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20110901163545.71ba1515@doriath> <4E6032AB.8080804@codemonkey.ws> <4E60DC77.5020300@redhat.com> <4E60E813.9000302@codemonkey.ws> <4E60F3B2.6000904@redhat.com> In-Reply-To: <4E60F3B2.6000904@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel , Luiz Capitulino , Marian Krcmarik , Alon Levy , spice-devel On 09/02/2011 05:18 PM, Gerd Hoffmann wrote: > >> Can you just use a bottom half to defer this work to the I/O thread? >> Bottom half scheduling has to be signal safe which means it will also be >> thread safe. > > Not that straight forward as I would have to pass arguments to the > bottom half. Can you add a variant of qemu_bh_new that accepts a sizeof for the new bottom half? Then the bottom half itself can be passed as the opaque and used for the arguments. Paolo