From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83EFDC433DB for ; Tue, 30 Mar 2021 10:30:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 99A11619A6 for ; Tue, 30 Mar 2021 10:30:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99A11619A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kaod.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRBeC-0003mD-Gl for qemu-devel@archiver.kernel.org; Tue, 30 Mar 2021 06:30:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRBcz-0003Dd-0K; Tue, 30 Mar 2021 06:29:41 -0400 Received: from smtpout1.mo529.mail-out.ovh.net ([178.32.125.2]:34431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRBcx-0003gT-8G; Tue, 30 Mar 2021 06:29:40 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.143.90]) by mo529.mail-out.ovh.net (Postfix) with ESMTPS id 66D8895D98BE; Tue, 30 Mar 2021 12:29:34 +0200 (CEST) Received: from kaod.org (37.59.142.99) by DAG8EX1.mxp5.local (172.16.2.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 30 Mar 2021 12:29:33 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G0033a4169ad-b92d-43cd-ab3f-30c9296730fc, ACC3036D4A0BACA70991A0E48D5F19CB1CCAE693) smtp.auth=groug@kaod.org X-OVh-ClientIp: 78.197.208.248 Date: Tue, 30 Mar 2021 12:29:32 +0200 From: Greg Kurz To: Stefan Hajnoczi Subject: Re: [RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transaction Message-ID: <20210330122932.13d83c0b@bahia.lan> In-Reply-To: References: <20210325150735.1098387-1-groug@kaod.org> <20210325150735.1098387-5-groug@kaod.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/_sOrxax2F4DzRDyoI.YPBlH"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG1EX2.mxp5.local (172.16.2.2) To DAG8EX1.mxp5.local (172.16.2.71) X-Ovh-Tracer-GUID: 4574ce3a-ff3f-4cd3-88f8-3117eac771ab X-Ovh-Tracer-Id: 18270540741800466735 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrudeitddgfedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukfgjfhfogggtihesghdtreerredtvdenucfhrhhomhepifhrvghgucfmuhhriicuoehgrhhouhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnheplefggfefueegudegkeevieevveejfffhuddvgeffteekieevueefgfeltdfgieetnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepghhrohhugheskhgrohgurdhorhhgpdhrtghpthhtohepqhgvmhhuqdgslhhotghksehnohhnghhnuhdrohhrgh Received-SPF: pass client-ip=178.32.125.2; envelope-from=groug@kaod.org; helo=smtpout1.mo529.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , qemu-devel@nongnu.org, Max Reitz , Paolo Bonzini , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --Sig_/_sOrxax2F4DzRDyoI.YPBlH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 29 Mar 2021 18:24:40 +0100 Stefan Hajnoczi wrote: > On Thu, Mar 25, 2021 at 04:07:31PM +0100, Greg Kurz wrote: > > diff --git a/softmmu/memory.c b/softmmu/memory.c > > index 1b1942d521cc..0279e5671bcb 100644 > > --- a/softmmu/memory.c > > +++ b/softmmu/memory.c > > @@ -2368,7 +2368,7 @@ void memory_region_add_eventfd_full(MemoryRegion = *mr, > > if (size) { > > adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); > > } > > - if (transaction) { > > + if (!transaction) { > > memory_region_transaction_begin(); > > } > > for (i =3D 0; i < mr->ioeventfd_nb; ++i) { > > @@ -2383,7 +2383,7 @@ void memory_region_add_eventfd_full(MemoryRegion = *mr, > > sizeof(*mr->ioeventfds) * (mr->ioeventfd_nb-1 - i)); > > mr->ioeventfds[i] =3D mrfd; > > ioeventfd_update_pending |=3D mr->enabled; > > - if (transaction) { > > + if (!transaction) { > > memory_region_transaction_commit(); > > } >=20 > Looks like these two hunks belong in a previous patch. And they are actually wrong... we *do* want a nested transaction if 'transaction' is true :) This is a leftover I thought I had removed but obviously not... --Sig_/_sOrxax2F4DzRDyoI.YPBlH Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEtIKLr5QxQM7yo0kQcdTV5YIvc9YFAmBi/YwACgkQcdTV5YIv c9aQ5hAAlNkfA0e3kywcL4dMEy3Lj+9QtNcwy7nI441l2JMwryr1dDGEpZsZpBXK sylIj56OAh160HculAgkzpmxo1jTFouMPF0NFp9JfrTRTce+tj7GFFtT/Csmbt/G Can75W9r+Ay+DX8sNrJAODbI1RJ/scnHbmfu4uM9BBKlG50styycrs5dfENTgK7b K6o0HKdnUXKIMByTSb37V30G50BCVd2VD3qXkSdRkBGWixt8kXf0CPnUMTP9jbbQ FZKRcrjZlekdsYlUO9NE6YoqvMRgUzn62sAcqrPO+qlyrex/yKhQ2950o7p5MkTy KrQgr5TTGMfcL1cC8bBqCEvKp6zFe21brNcmSoMgyN0oJbegEi5DlUwwLuvYU+c3 qvuVfjLHFE642UfOM/g1JaR8eYTAmg7wj5bIUdBFYN1k9urQY/IlTCY5rKmaMsq+ UFuTFpMt7N/P7SH+SZ6AYgrfkjhbKVG+jNSeFMLFnifNpzfILGOs7KDthkinsSrv Wm4NMRgKklvKDGlZjR7wFFu2ks3PFgCEPY6+/Jf9TyII0L76jCvuTGzXaIbF/7t7 Zad2F0vIr2TS5J3tfaGa69Y8e4OVE8s5eduurOY4k6e4vbvOTqIZH9zhOGrzfxty t9UKyIjm+lnnZIPu/2FMYsKsMe8aeUMCOnPfOWtdB6QmJAu3Dcc= =0Xnd -----END PGP SIGNATURE----- --Sig_/_sOrxax2F4DzRDyoI.YPBlH--