From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da6vi-0006ol-Vt for qemu-devel@nongnu.org; Tue, 25 Jul 2017 16:59:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da6vg-0005Yo-Ad for qemu-devel@nongnu.org; Tue, 25 Jul 2017 16:59:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48410) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1da6vg-0005YK-0q for qemu-devel@nongnu.org; Tue, 25 Jul 2017 16:59:44 -0400 Message-ID: <1501016375.26846.21.camel@redhat.com> From: Rik van Riel Date: Tue, 25 Jul 2017 16:59:35 -0400 In-Reply-To: References: <1455443283.33337333.1500618150787.JavaMail.zimbra@redhat.com> <1500818683.4073.31.camel@redhat.com> <1500833428.4073.36.camel@redhat.com> <20170724102330.GE652@quack2.suse.cz> <1157879323.33809400.1500897967669.JavaMail.zimbra@redhat.com> <20170724123752.GN652@quack2.suse.cz> <1888117852.34216619.1500992835767.JavaMail.zimbra@redhat.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-0yV1qDWO2FxT0D2yrVqZ" Mime-Version: 1.0 Subject: Re: [Qemu-devel] KVM "fake DAX" flushing interface - discussion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dan Williams , Pankaj Gupta Cc: Jan Kara , Stefan Hajnoczi , Stefan Hajnoczi , kvm-devel , Qemu Developers , "linux-nvdimm@lists.01.org" , ross zwisler , Paolo Bonzini , Kevin Wolf , Nitesh Narayan Lal , xiaoguangrong eric , Haozhong Zhang , Ross Zwisler --=-0yV1qDWO2FxT0D2yrVqZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2017-07-25 at 07:46 -0700, Dan Williams wrote: > On Tue, Jul 25, 2017 at 7:27 AM, Pankaj Gupta > wrote: > >=20 > > Looks like only way to send flush(blk dev) from guest to host with > > nvdimm > > is using flush hint addresses. Is this the correct interface I am > > looking? > >=20 > > blkdev_issue_flush > > =C2=A0submit_bio_wait > > =C2=A0 submit_bio > > =C2=A0=C2=A0=C2=A0=C2=A0generic_make_request > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0pmem_make_request > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0... > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (b= io->bi_opf & REQ_FLUSH) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0nvdimm_flush(nd_region); >=20 > I would inject a paravirtualized version of pmem_make_request() that > sends an async flush operation over virtio to the host. Don't try to > use flush hint addresses for this, they don't have the proper > semantics. The guest should be allowed to issue the flush and receive > the completion asynchronously rather than taking a vm exist and > blocking on that request. That is my feeling, too. A slower IO device benefits greatly from an asynchronous flush mechanism. --=20 All rights reversed --=-0yV1qDWO2FxT0D2yrVqZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJZd7E3AAoJEM553pKExN6DyR0H/jCXdUHi8A0l9aysr2waOPQ+ IjABA2T0vyG9QqufzE268g9NO7W9a79k0wcwvtU8S6P/7MUE6DU8ZLDvbQW+M3Td VxBL9DmthzJFJy8/3EGvTUU+sEB1Qm8EeGu844ME8Ea6/rPHJwjHG/shnmocHeyl G4Mpvc+zzz2WvZSwpsWtodon7jYfWY7NpPHp/JjwMfIVTErTFpSDZsTKpneFs9aC s2EwM5WyuLlGt9bEPhQe9eQMiGeHsz5hLnO/9HdUZ8Let61bCGrZ5gn+yg0FHit7 lvQFPh1FxjWdFiRNYcAtFOATHWsNhhMWgRUZ2+GX3JKABDa+/LVaRYqtFDErmz8= =usoe -----END PGP SIGNATURE----- --=-0yV1qDWO2FxT0D2yrVqZ--