nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Pankaj Gupta <pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Kevin Wolf <kwolf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
	Xiao Guangrong
	<xiaoguangrong.eric-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	KVM list <kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Rik van Riel <riel-ebMLmSuQjDVBDgjK7y7TUQ@public.gmane.org>,
	linux-nvdimm
	<linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org>,
	David Hildenbrand <david-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Zwisler,
	Ross" <ross.zwisler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Qemu Developers
	<qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org>,
	Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Linux MM <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
	Igor Mammedov <imammedo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Michael S. Tsirkin"
	<mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Stefan Hajnoczi
	<stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	niteshnarayanlal-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org,
	Marcel Apfelbaum <marcel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Paolo Bonzini <pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	lcapitulino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	Nitesh Narayan Lal
	<nilal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [RFC v2 2/2] pmem: device flush over VIRTIO
Date: Wed, 25 Apr 2018 07:23:53 -0700	[thread overview]
Message-ID: <CAPcyv4gpZzKfE7jY1peYOVd6sVhNz7jce1s_xNH_2Lt8AjRK-Q@mail.gmail.com> (raw)
In-Reply-To: <20180425112415.12327-3-pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Wed, Apr 25, 2018 at 4:24 AM, Pankaj Gupta <pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> This patch adds functionality to perform
> flush from guest to hosy over VIRTIO
> when 'ND_REGION_VIRTIO'flag is set on
> nd_negion. Flag is set by 'virtio-pmem'
> driver.
>
> Signed-off-by: Pankaj Gupta <pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/nvdimm/region_devs.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
> index a612be6..6c6454e 100644
> --- a/drivers/nvdimm/region_devs.c
> +++ b/drivers/nvdimm/region_devs.c
> @@ -20,6 +20,7 @@
>  #include <linux/nd.h>
>  #include "nd-core.h"
>  #include "nd.h"
> +#include <linux/virtio_pmem.h>
>
>  /*
>   * For readq() and writeq() on 32-bit builds, the hi-lo, lo-hi order is
> @@ -1074,6 +1075,12 @@ void nvdimm_flush(struct nd_region *nd_region)
>         struct nd_region_data *ndrd = dev_get_drvdata(&nd_region->dev);
>         int i, idx;
>
> +       /* call PV device flush */
> +       if (test_bit(ND_REGION_VIRTIO, &nd_region->flags)) {
> +               virtio_pmem_flush(&nd_region->dev);
> +               return;
> +       }
> +

I'd rather introduce a ->flush() operation hanging off of 'struct
nd_region' so that this multiplexing can be a static setting.

  parent reply	other threads:[~2018-04-25 14:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25 11:24 [RFC v2 0/2] kvm "fake DAX" device flushing Pankaj Gupta
     [not found] ` <20180425112415.12327-1-pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-04-25 11:24   ` [RFC v2 1/2] virtio: add pmem driver Pankaj Gupta
     [not found]     ` <20180425112415.12327-2-pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-04-25 14:21       ` Dan Williams
     [not found]         ` <CAPcyv4hvrB08XPTbVK0xT2_1Xmaid=-v3OMxJVDTNwQucsOHLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-25 14:43           ` Dan Williams
     [not found]             ` <CAPcyv4hiowWozV527sQA_e4fdgCYbD6xfG==vepAqu0hxQEQcw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-26 12:27               ` Jeff Moyer
     [not found]                 ` <x49o9i6885e.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2018-04-26 17:15                   ` [Qemu-devel] " Pankaj Gupta
     [not found]                     ` <1499190564.23017177.1524762938762.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-04-26 17:24                       ` Jeff Moyer
2018-04-25 14:52       ` Michael S. Tsirkin
     [not found]         ` <20180425174705-mutt-send-email-mst-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2018-04-25 15:11           ` [Qemu-devel] " Pankaj Gupta
2018-04-26 13:12     ` Stefan Hajnoczi
     [not found]       ` <20180426131236.GA30991-lxVrvc10SDRcolVlb+j0YCZi+YwRKgec@public.gmane.org>
2018-04-26 15:44         ` Pankaj Gupta
2018-04-27 13:31           ` Stefan Hajnoczi
     [not found]             ` <20180427133146.GB11150-lxVrvc10SDRcolVlb+j0YCZi+YwRKgec@public.gmane.org>
2018-04-28 10:48               ` Pankaj Gupta
2018-04-25 11:24   ` [RFC v2 2/2] pmem: device flush over VIRTIO Pankaj Gupta
     [not found]     ` <20180425112415.12327-3-pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-04-25 14:23       ` Dan Williams [this message]
     [not found]         ` <CAPcyv4gpZzKfE7jY1peYOVd6sVhNz7jce1s_xNH_2Lt8AjRK-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-25 14:47           ` Pankaj Gupta
2018-04-26 13:15     ` Stefan Hajnoczi
     [not found]       ` <20180426131517.GB30991-lxVrvc10SDRcolVlb+j0YCZi+YwRKgec@public.gmane.org>
2018-04-26 16:40         ` Pankaj Gupta
     [not found]           ` <58645254.23011245.1524760853269.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-04-26 16:57             ` Dan Williams
     [not found]               ` <CAPcyv4jv-hJNKJxak98T7aCnWztVEDTE8o=8fjvOrVmrTfyjdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-26 17:13                 ` Pankaj Gupta
2018-04-25 11:24   ` [RFC v2] qemu: Add virtio pmem device Pankaj Gupta
     [not found]     ` <20180425112415.12327-4-pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-04-25 11:35       ` [Qemu-devel] " no-reply-isE1Te71pDtAfugRpC6u6w
2018-04-25 11:58         ` Pankaj Gupta
2018-04-25 14:23           ` Eric Blake
     [not found]             ` <79f72139-0fcb-3d5e-a16c-24f3b5ee1a07-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-04-25 14:51               ` Pankaj Gupta
2018-04-25 11:46     ` no-reply
2018-04-25 14:25     ` Eric Blake
     [not found]       ` <25f3e433-cfa6-4a62-ba7f-47aef1119dfc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-04-25 14:55         ` Pankaj Gupta
2018-04-26 13:24     ` Stefan Hajnoczi
     [not found]       ` <20180426132406.GC30991-lxVrvc10SDRcolVlb+j0YCZi+YwRKgec@public.gmane.org>
2018-04-26 16:43         ` [Qemu-devel] " Pankaj Gupta
2018-06-01 12:24   ` [Qemu-devel] [RFC v2 0/2] kvm "fake DAX" device flushing Igor Mammedov
     [not found]     ` <20180601142410.5c986f13-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-06-04  5:56       ` Pankaj Gupta
2018-06-04  9:55       ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPcyv4gpZzKfE7jY1peYOVd6sVhNz7jce1s_xNH_2Lt8AjRK-Q@mail.gmail.com \
    --to=dan.j.williams-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=david-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=imammedo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jack-AlSwsSmVLrQ@public.gmane.org \
    --cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kwolf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=lcapitulino-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org \
    --cc=marcel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=nilal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=niteshnarayanlal-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org \
    --cc=pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org \
    --cc=riel-ebMLmSuQjDVBDgjK7y7TUQ@public.gmane.org \
    --cc=ross.zwisler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=xiaoguangrong.eric-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).