From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rik van Riel Subject: Re: KVM "fake DAX" flushing interface - discussion Date: Tue, 25 Jul 2017 16:59:35 -0400 Message-ID: <1501016375.26846.21.camel@redhat.com> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-0yV1qDWO2FxT0D2yrVqZ" 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 To: Dan Williams , Pankaj Gupta Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36776 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbdGYU7k (ORCPT ); Tue, 25 Jul 2017 16:59:40 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: --=-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--