public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong.eric-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Kevin Wolf <kwolf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Pankaj Gupta <pagupta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Rik van Riel <riel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
	kvm-devel <kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Stefan Hajnoczi
	<stefanha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Ross Zwisler
	<ross.zwisler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Qemu Developers
	<qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org>,
	Stefan Hajnoczi
	<stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
	<linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org>,
	Paolo Bonzini <pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Nitesh Narayan Lal
	<nilal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: KVM "fake DAX" flushing interface - discussion
Date: Wed, 1 Nov 2017 14:46:11 +0800	[thread overview]
Message-ID: <ca6aaa77-cca0-441e-be49-73133d8581cf@gmail.com> (raw)
In-Reply-To: <CAPcyv4jR_LdbsX-rAsHC7++C6d-WYC084uWXzr+08PSYwoXFMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>



On 11/01/2017 12:25 PM, Dan Williams wrote:
> On Tue, Oct 31, 2017 at 8:43 PM, Xiao Guangrong
> <xiaoguangrong.eric-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>
>> On 10/31/2017 10:20 PM, Dan Williams wrote:
>>>
>>> On Tue, Oct 31, 2017 at 12:13 AM, Xiao Guangrong
>>> <xiaoguangrong.eric-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>
>>>>
>>>>
>>>> On 07/27/2017 08:54 AM, Dan Williams wrote:
>>>>
>>>>>> At that point, would it make sense to expose these special
>>>>>> virtio-pmem areas to the guest in a slightly different way,
>>>>>> so the regions that need virtio flushing are not bound by
>>>>>> the regular driver, and the regular driver can continue to
>>>>>> work for memory regions that are backed by actual pmem in
>>>>>> the host?
>>>>>
>>>>>
>>>>>
>>>>> Hmm, yes that could be feasible especially if it uses the ACPI NFIT
>>>>> mechanism. It would basically involve defining a new SPA (System
>>>>> Phyiscal Address) range GUID type, and then teaching libnvdimm to
>>>>> treat that as a new pmem device type.
>>>>
>>>>
>>>>
>>>> I would prefer a new flush mechanism to a new memory type introduced
>>>> to NFIT, e.g, in that mechanism we can define request queues and
>>>> completion queues and any other features to make virtualization
>>>> friendly. That would be much simpler.
>>>>
>>>
>>> No that's more confusing because now we are overloading the definition
>>> of persistent memory. I want this memory type identified from the top
>>> of the stack so it can appear differently in /proc/iomem and also
>>> implement this alternate flush communication.
>>>
>>
>> For the characteristic of memory, I have no idea why VM should know this
>> difference. It can be completely transparent to VM, that means, VM
>> does not need to know where this virtual PMEM comes from (for a really
>> nvdimm backend or a normal storage). The only discrepancy is the flush
>> interface.
> 
> It's not persistent memory if it requires a hypercall to make it
> persistent. Unless memory writes can be made durable purely with cpu
> instructions it's dangerous for it to be treated as a PMEM range.
> Consider a guest that tried to map it with device-dax which has no
> facility to route requests to a special flushing interface.
> 

Can we separate the concept of flush interface from persistent memory?
Say there are two APIs, one is used to indicate the memory type (i.e,
/proc/iomem) and another one indicates the flush interface.

So for existing nvdimm hardwares:
1: Persist-memory + CLFLUSH
2: Persiste-memory + flush-hint-table (I know Intel does not use it)

and for the virtual nvdimm which backended on normal storage:
Persist-memory + virtual flush interface

>>
>>> In what way is this "more complicated"? It was trivial to add support
>>> for the "volatile" NFIT range, this will not be any more complicated
>>> than that.
>>>
>>
>> Introducing memory type is easy indeed, however, a new flush interface
>> definition is inevitable, i.e, we need a standard way to discover the
>> MMIOs to communicate with host.
> 
> Right, the proposed way to do that for x86 platforms is a new SPA
> Range GUID type. in the NFIT.
> 

So this SPA is used for both persistent memory region and flush interface?
Maybe i missed it in previous mails, could you please detail how to do
it?

BTW, please note hypercall is not acceptable for standard, MMIO/PIO regions
are. (Oh, yes, it depends on Paolo. :))

  parent reply	other threads:[~2017-11-01  6:46 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 [this message]
     [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
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=ca6aaa77-cca0-441e-be49-73133d8581cf@gmail.com \
    --to=xiaoguangrong.eric-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=jack-AlSwsSmVLrQ@public.gmane.org \
    --cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kwolf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org \
    --cc=nilal-H+wXaHxf7aLQT0dZR+AlfA@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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ross.zwisler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=stefanha-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