From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYZuz-0004fL-Sh for qemu-devel@nongnu.org; Sat, 04 May 2013 06:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYZuy-0003NK-UL for qemu-devel@nongnu.org; Sat, 04 May 2013 06:42:17 -0400 Received: from mout.web.de ([212.227.17.11]:52317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYZuy-0003Mj-L3 for qemu-devel@nongnu.org; Sat, 04 May 2013 06:42:16 -0400 Message-ID: <5184E601.9030407@web.de> Date: Sat, 04 May 2013 12:42:09 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1353808984-22368-1-git-send-email-qemulist@gmail.com> <51829B30.7020308@siemens.com> <51836FA8.2000501@siemens.com> <5184D942.5020506@redhat.com> In-Reply-To: <5184D942.5020506@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2CJGVQVSSDKJXUPXDKUNU" Subject: Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel , Liu Ping Fan This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2CJGVQVSSDKJXUPXDKUNU Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-05-04 11:47, Paolo Bonzini wrote: > Il 03/05/2013 10:04, Jan Kiszka ha scritto: >> We can't change the semantics of opaque as long as old_mmio / old_port= io >> are around. But we need a flag anyway to indicate if a region is >> depending on BQL or not. Adding a separate "Object *owner" to >> MemoryRegion can serve both purposes. Then we define something like >> >> void memory_region_set_local_locking(MemoryRegion *mr, >> bool local_locking, >> Object *owner); >> >> to control the property (if local_locking is true, owner must be >> non-NULL, of course). That's quite similar to my old prototype here th= at >> had memory_region_set/clear_global_locking. >=20 > I think setting the owner can be done separately from enabling local > lock. For example, memory_region_find could also have a variant that > adds a ref to the owner. It would be very similar to what Ping Fan is > doing in the virtio-dataplane's HostMem data structure. That's trivial to break up, but I'm not sure if there will be reasonable scenarios where a region requires reference counting without being able to work without the BQL. RAM, e.g., should always work BQL-free (once we have the infrastructure in place). And memory_region_find should likely always increment a reference if the target region has an owner. We should convert its users to properly dereference the region once done with it. Jan ------enig2CJGVQVSSDKJXUPXDKUNU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGE5gQACgkQitSsb3rl5xSYqQCghdKi/evgyHCCY0e3wTnqsYIF HyMAn313qcqS7UMBRuCR0QImR0VRn8O4 =KBl7 -----END PGP SIGNATURE----- ------enig2CJGVQVSSDKJXUPXDKUNU--