From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb28d-0003Tm-KA for qemu-devel@nongnu.org; Thu, 05 Jul 2018 07:09:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb28a-00055h-FP for qemu-devel@nongnu.org; Thu, 05 Jul 2018 07:09:27 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:45240 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fb28a-00054l-9k for qemu-devel@nongnu.org; Thu, 05 Jul 2018 07:09:24 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3BC64023132 for ; Thu, 5 Jul 2018 11:09:23 +0000 (UTC) From: Markus Armbruster References: <20180704084507.14560-1-peterx@redhat.com> <20180704084507.14560-5-peterx@redhat.com> <87woua9iay.fsf@dusky.pond.sub.org> <20180705094903.GA23001@xz-mi> Date: Thu, 05 Jul 2018 13:09:19 +0200 In-Reply-To: <20180705094903.GA23001@xz-mi> (Peter Xu's message of "Thu, 5 Jul 2018 17:49:03 +0800") Message-ID: <87sh4y7xcw.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 4/9] monitor: move need_resume flag into monitor struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , qemu-devel@nongnu.org, "Dr . David Alan Gilbert" Peter Xu writes: > On Thu, Jul 05, 2018 at 10:51:33AM +0200, Markus Armbruster wrote: >> Peter Xu writes: >>=20 >> > It was put into the request object to show whether we'll need to resume >> > the monitor after dispatching the command. Now we move that into the >> > monitor struct so that it might be even used in other places in the >> > future, e.g., out-of-band message flow controls. >> > >> > One thing to mention is that there is no lock needed before when >> > accessing the flag since the request object will always be owned by a >> > single thread. After we move it into monitor struct we need to protect >> > that flag since it might be accessed by multiple threads now. Renaming >> > the qmp_queue_lock into qmp_lock to protect the flag as well. >> > >> > No functional change. >> > >> > Signed-off-by: Peter Xu >>=20 >> Marc-Andr=C3=A9's "[PATCH v3 04/38] monitor: no need to save need_resume= " and >> "[PATCH v3 05/38] monitor: further simplify previous patch" also mess >> with need_resume. Marc-Andr=C3=A9, could you have a look at this patch = and >> the next one? > > Sorry I should have looked at those before hand. I think I must be > waiting for another post to split the patches into two (after > Marc-Andre poked me with that thread) but then I forgot about that. > > So now I suspect we'd better keep that flag since in the next patch > the suspend operation can happen conditionally now. Could you two together figure out how to combine your work? Would take me off this critical path...