public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Pankaj Gupta <pagupta@redhat.com>
To: David Hildenbrand <david@redhat.com>,
	Dan Williams <dan.j.williams@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Rik van Riel <riel@redhat.com>,
	Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
	Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.cz>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	kvm-devel <kvm@vger.kernel.org>,
	Qemu Developers <qemu-devel@nongnu.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	ross zwisler <ross.zwisler@linux.intel.com>,
	Kevin Wolf <kwolf@redhat.com>,
	Nitesh Narayan Lal <nilal@redhat.com>,
	Haozhong Zhang <haozhong.zhang@intel.com>,
	Ross Zwisler <ross.zwisler@intel.com>,
	Rik van Riel <riel@surriel.com>
Subject: Re: KVM "fake DAX" flushing interface - discussion
Date: Thu, 18 Jan 2018 13:54:49 -0500 (EST)	[thread overview]
Message-ID: <1419599412.1747020.1516301689815.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <72839100-7fdf-693c-e9c2-348a5add8a56@redhat.com>


> 
> >> I'd like to emphasize again, that I would prefer a virtio-pmem only
> >> solution.
> >>
> >> There are architectures out there (e.g. s390x) that don't support
> >> NVDIMMs - there is no HW interface to expose any such stuff.
> >>
> >> However, with virtio-pmem, we could make it work also on architectures
> >> not having ACPI and friends.
> > 
> > ACPI and virtio-only can share the same pmem driver. There are two
> > parts to this, region discovery and setting up the pmem driver. For
> > discovery you can either have an NFIT-bus defined range, or a new
> > virtio-pmem-bus define it. As far as the pmem driver itself it's
> > agnostic to how the range is discovered.
> > 
> 
> And in addition to discovery + setup, we need the flush via virtio.
> 
> > In other words, pmem consumes 'regions' from libnvdimm and the a bus
> > provider like nfit, e820, or a new virtio-mechansim produce 'regions'.
> > 
> 
> That sounds good to me. I would like to see how the ACPI discovery
> variant connects to a virtio ring.
> 
> The natural way for me would be:
> 
> A virtio-X device supplies a memory region ("discovery") and also the
> interface for flushes for this device. So one virtio-X corresponds to
> one pmem device. No ACPI to be involved (also not on architectures that
> have ACPI)

I agree here if we discover regions with virtio-X we don't need to worry about
NFIT ACPI. Actually, there are three ways to do it with pros and cons of these 
approaches: 

1] Existing pmem driver & virtio for region discovery:
  -----------------------------------------------------
  Use existing pmem driver which is tightly coupled with concepts of namespaces, labels etc 
  from ACPI region discovery and re-implement these concepts with virtio so that existing
  pmem driver can understand it. In addition to this, task of pmem driver to send flush command
  using virtio.
  
2] Existing pmem driver & ACPI NFIT for region discovery:
  ----------------------------------------------------------------
- If we use NFIT ACPI, we need to teach existing ACPI driver to add this new memory
  type and teach existing pmem driver to handle this new memory type. Still we need 
  an asynchronous(virtio) way to send flush commands. We need virtio device/driver
  or arbitrary key/value like pair just to send commands from guest to host using virtio. 

3] New Virtio pmem driver & paravirt device:
 ----------------------------------------
  Third way is new virtio pmem driver with less work to support existing features of different protocols, 
  and with asynchronous way of sending flush commands.

  But this needs to duplicate some of the work which existing pmem driver does but as discussed 
  previously we can separate common code from existing pmem driver and reuse it.

Among these approaches I also prefer 3].

> 
> --
> 
> Thanks,
> 
> David / dhildenb
> 

  parent reply	other threads:[~2018-01-18 18:54 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1455443283.33337333.1500618150787.JavaMail.zimbra@redhat.com>
     [not found] ` <1455443283.33337333.1500618150787.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-21  6:56   ` KVM "fake DAX" flushing interface - discussion Pankaj Gupta
2017-07-21  9:51     ` Haozhong Zhang
2017-07-21 10:21       ` Pankaj Gupta
2017-07-21 12:12     ` Stefan Hajnoczi
2017-07-21 13:29       ` Pankaj Gupta
     [not found]         ` <46101617.33460557.1500643755247.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-21 14:00           ` Rik van Riel
2017-07-21 15:58         ` Stefan Hajnoczi
     [not found]           ` <20170721155848.GO18014-lxVrvc10SDRcolVlb+j0YCZi+YwRKgec@public.gmane.org>
2017-07-22 19:34             ` Dan Williams
     [not found]               ` <CAPcyv4gtWYpzbmggsbdLocPiMzU2rVt-ee+kL24gbrPxKd5Eyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-23 14:04                 ` Rik van Riel
     [not found]                   ` <1500818683.4073.31.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-23 16:01                     ` Dan Williams
     [not found]                       ` <CAPcyv4h5O4D2kp6SJhWiz4V=dOLDa_Q3pk2B=u-x7hKKQqdXsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-23 18:10                         ` Rik van Riel
2017-07-23 20:10                           ` Dan Williams
     [not found]                             ` <CAPcyv4hpbk0jgp+mA=q05zVBV8ZSZvCvV68JJ4gjE3QhK70d1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-24 10:23                               ` Jan Kara
     [not found]                                 ` <20170724102330.GE652-4I4JzKEfoa/jFM9bn6wA6Q@public.gmane.org>
2017-07-24 12:06                                   ` Pankaj Gupta
2017-07-24 12:37                                     ` Jan Kara
     [not found]                                       ` <20170724123752.GN652-4I4JzKEfoa/jFM9bn6wA6Q@public.gmane.org>
2017-07-24 15:10                                         ` Dan Williams
2017-07-24 15:48                                           ` Jan Kara
2017-07-24 16:19                                             ` Dan Williams
2017-07-25 14:27                                       ` Pankaj Gupta
     [not found]                                         ` <1888117852.34216619.1500992835767.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-25 14:46                                           ` Dan Williams
2017-07-25 20:59                                             ` Rik van Riel
     [not found]                                               ` <1501016375.26846.21.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-26 13:47                                                 ` Pankaj Gupta
2017-07-26 21:27                                                   ` Rik van Riel
2017-07-26 21:40                                                     ` Dan Williams
2017-07-26 23:46                                                       ` Rik van Riel
     [not found]                                                         ` <1501112787.4073.49.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-07-27  0:54                                                           ` Dan Williams
     [not found]                                                             ` <CAPcyv4gbC6Hx_4YsCfOd2t=fn=wPGp5h__1QH=-p40TPFNbFzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-31  7:13                                                               ` Xiao Guangrong
2017-10-31 14:20                                                                 ` Dan Williams
     [not found]                                                                   ` <CAPcyv4iw2cCpDmr+4kxsFvdy+iGZiz=ok-kLhsDKpqDy+szf-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-01  3:43                                                                     ` Xiao Guangrong
2017-11-01  4:25                                                                       ` Dan Williams
     [not found]                                                                         ` <CAPcyv4jR_LdbsX-rAsHC7++C6d-WYC084uWXzr+08PSYwoXFMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-01  6:46                                                                           ` Xiao Guangrong
     [not found]                                                                             ` <ca6aaa77-cca0-441e-be49-73133d8581cf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-01 15:20                                                                               ` Dan Williams
     [not found]                                                                                 ` <CAPcyv4gKzvd39WbnKjbs3Bn9+o1tt=vz90CYMFu0DF5PsfHUig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-02  8:50                                                                                   ` Xiao Guangrong
2017-11-02 16:30                                                                                     ` Dan Williams
     [not found]                                                                                       ` <CAPcyv4iH==cqVAdd8i1y-8A6SuXU75OH1EZzgNMvtA21wfxPpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-03  6:21                                                                                         ` Xiao Guangrong
2017-11-21 18:19                                                                                           ` Rik van Riel
     [not found]                                                                                             ` <1511288389.1080.14.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-11-21 18:26                                                                                               ` Dan Williams
2017-11-21 18:35                                                                                                 ` Rik van Riel
2017-11-23  4:05                                                                                             ` Xiao Guangrong
2017-11-23 16:14                                                                                               ` Dan Williams
2017-11-23 16:28                                                                                                 ` Paolo Bonzini
2017-11-24 12:40                                                                                                   ` Pankaj Gupta
     [not found]                                                                                                     ` <336152896.34452750.1511527207457.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-11-24 12:44                                                                                                       ` Paolo Bonzini
2017-11-24 13:02                                                                                                         ` [Qemu-devel] " Pankaj Gupta
2017-11-24 13:20                                                                                                           ` Paolo Bonzini
2017-11-28 18:03                                                                                                     ` Dan Williams
     [not found]                                                                                                       ` <CAPcyv4j6nk1cJFuG4DDA9JoNJe2d3rSskdFSUPu4aWzWX+JQeQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-13  6:23                                                                                                         ` Pankaj Gupta
     [not found]                                                                                                           ` <326660076.6160176.1515824585284.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-17 16:17                                                                                                             ` Dan Williams
2018-01-17 17:31                                                                                                               ` Pankaj Gupta
2018-01-18 16:53                                                                                                     ` David Hildenbrand
     [not found]                                                                                                       ` <f1ca60cc-5506-a161-b473-f0de363b7e95-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-18 17:38                                                                                                         ` Dan Williams
2018-01-18 17:48                                                                                                           ` David Hildenbrand
     [not found]                                                                                                             ` <72839100-7fdf-693c-e9c2-348a5add8a56-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-18 18:45                                                                                                               ` Dan Williams
2018-01-18 18:54                                                                                                             ` Pankaj Gupta [this message]
2018-01-18 18:59                                                                                                               ` Dan Williams
     [not found]                                                                                                                 ` <CAPcyv4hso5FYCyxYBHRhHvsU+M_wrkQBwVKurK-i6BQYzQduPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-18 19:36                                                                                                                   ` Pankaj Gupta
2018-01-18 19:48                                                                                                                     ` Dan Williams
2018-01-18 19:51                                                                                                                   ` David Hildenbrand
2018-01-18 20:11                                                                                                                     ` Dan Williams
2017-11-06  7:57                                                                                       ` [Qemu-devel] " Pankaj Gupta
2017-11-06 16:57                                                                                         ` Dan Williams
     [not found]                                                                                           ` <CAPcyv4jdJwUQTy7O7Ar82J+gAi54ycCTa=HSfXY5Ogwqi+oC-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-07 11:21                                                                                             ` Pankaj Gupta

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=1419599412.1747020.1516301689815.JavaMail.zimbra@redhat.com \
    --to=pagupta@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=haozhong.zhang@intel.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=nilal@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riel@redhat.com \
    --cc=riel@surriel.com \
    --cc=ross.zwisler@intel.com \
    --cc=ross.zwisler@linux.intel.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=xiaoguangrong.eric@gmail.com \
    /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