All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yang <richardw.yang@linux.intel.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Wei Yang <richardw.yang@linux.intel.com>,
	qemu-devel@nongnu.org, xiaoguangrong.eric@gmail.com,
	stefanha@redhat.com, pbonzini@redhat.com, pagupta@redhat.com,
	yu.c.zhang@linux.intel.com, imammedo@redhat.com,
	dan.j.williams@intel.com, yi.z.zhang@linux.intel.com
Subject: Re: [Qemu-devel] [PATCH v14 0/2] support MAP_SYNC for memory-backend-file
Date: Tue, 23 Apr 2019 10:41:51 +0800	[thread overview]
Message-ID: <20190423024151.GA10783@richard> (raw)
In-Reply-To: <20190422182255.GV25134@habkost.net>

On Mon, Apr 22, 2019 at 03:22:55PM -0300, Eduardo Habkost wrote:
>On Mon, Apr 22, 2019 at 08:34:51AM -0400, Michael S. Tsirkin wrote:
>> On Mon, Apr 22, 2019 at 08:48:47AM +0800, Wei Yang wrote:
>> > Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to
>> > guarantee the write persistence to mmap'ed files supporting DAX (e.g.,
>> > files on ext4/xfs file system mounted with '-o dax').
>> > 
>> > A description of MAP_SYNC and MAP_SHARED_VALIDATE can be found at
>> >     https://patchwork.kernel.org/patch/10028151/
>> > 
>> > In order to make sure that the file metadata is in sync after a fault 
>> > while we are writing a shared DAX supporting backend files, this
>> > patch-set enables QEMU to use MAP_SYNC flag for memory-backend-dax-file.
>> > 
>> > As the DAX vs DMA truncated issue was solved, we refined the code and
>> > send out this feature for the v5 version.
>> > 
>> > We will pass MAP_SYNC to mmap(2); if MAP_SYNC is supported and
>> > 'share=on' & 'pmem=on'. 
>> > Or QEMU will not pass this flag to mmap(2)
>> 
>> OK this is in a good shape. As we are in freeze anyway,
>> there's still a bit more time to polish it. I have a couple of
>> suggestions:
>> 
>> - squash docs in same patch with code, no need for two patches
>> - mmap errors are not silently ignored as the doc says,
>>   a warning is produced
>
>Note that a warning is produced only if both share=on and pmem=on
>is specified.  If using pmem=on without share=on, no warning is
>printed at all.
>
>I agree we could squash the docs in the same patch, but I don't
>want to prevent the code from being merged and require v15 to be
>sent just because we are still polishing the documentation.
>
>If there are no objections, I plan to apply this version of the
>series including the following fixup (just removing the word
>"silently"), and I suggest further improvements to be sent as
>follow up patches.
>

If my understanding is correct, the following up patch is:

"send the warnings to an errp object and not stderr"

-- 
Wei Yang
Help you, Help me

WARNING: multiple messages have this Message-ID (diff)
From: Wei Yang <richardw.yang@linux.intel.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: pagupta@redhat.com, xiaoguangrong.eric@gmail.com,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, yi.z.zhang@linux.intel.com,
	yu.c.zhang@linux.intel.com,
	Wei Yang <richardw.yang@linux.intel.com>,
	stefanha@redhat.com, imammedo@redhat.com, pbonzini@redhat.com,
	dan.j.williams@intel.com
Subject: Re: [Qemu-devel] [PATCH v14 0/2] support MAP_SYNC for memory-backend-file
Date: Tue, 23 Apr 2019 10:41:51 +0800	[thread overview]
Message-ID: <20190423024151.GA10783@richard> (raw)
Message-ID: <20190423024151.r7GydGnU87pOsceVqhXFypVs3mpRk8NBfm1D764RuLU@z> (raw)
In-Reply-To: <20190422182255.GV25134@habkost.net>

On Mon, Apr 22, 2019 at 03:22:55PM -0300, Eduardo Habkost wrote:
>On Mon, Apr 22, 2019 at 08:34:51AM -0400, Michael S. Tsirkin wrote:
>> On Mon, Apr 22, 2019 at 08:48:47AM +0800, Wei Yang wrote:
>> > Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to
>> > guarantee the write persistence to mmap'ed files supporting DAX (e.g.,
>> > files on ext4/xfs file system mounted with '-o dax').
>> > 
>> > A description of MAP_SYNC and MAP_SHARED_VALIDATE can be found at
>> >     https://patchwork.kernel.org/patch/10028151/
>> > 
>> > In order to make sure that the file metadata is in sync after a fault 
>> > while we are writing a shared DAX supporting backend files, this
>> > patch-set enables QEMU to use MAP_SYNC flag for memory-backend-dax-file.
>> > 
>> > As the DAX vs DMA truncated issue was solved, we refined the code and
>> > send out this feature for the v5 version.
>> > 
>> > We will pass MAP_SYNC to mmap(2); if MAP_SYNC is supported and
>> > 'share=on' & 'pmem=on'. 
>> > Or QEMU will not pass this flag to mmap(2)
>> 
>> OK this is in a good shape. As we are in freeze anyway,
>> there's still a bit more time to polish it. I have a couple of
>> suggestions:
>> 
>> - squash docs in same patch with code, no need for two patches
>> - mmap errors are not silently ignored as the doc says,
>>   a warning is produced
>
>Note that a warning is produced only if both share=on and pmem=on
>is specified.  If using pmem=on without share=on, no warning is
>printed at all.
>
>I agree we could squash the docs in the same patch, but I don't
>want to prevent the code from being merged and require v15 to be
>sent just because we are still polishing the documentation.
>
>If there are no objections, I plan to apply this version of the
>series including the following fixup (just removing the word
>"silently"), and I suggest further improvements to be sent as
>follow up patches.
>

If my understanding is correct, the following up patch is:

"send the warnings to an errp object and not stderr"

-- 
Wei Yang
Help you, Help me


  reply	other threads:[~2019-04-23  2:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22  0:48 [Qemu-devel] [PATCH v14 0/2] support MAP_SYNC for memory-backend-file Wei Yang
2019-04-22  0:48 ` Wei Yang
2019-04-22  0:48 ` [Qemu-devel] [PATCH v14 1/2] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap() Wei Yang
2019-04-22  0:48   ` Wei Yang
2019-04-23  9:25   ` Stefan Hajnoczi
2019-04-23  9:25     ` Stefan Hajnoczi
2019-04-24  1:01     ` Wei Yang
2019-04-24  1:01       ` Wei Yang
2019-04-25  8:26       ` Stefan Hajnoczi
2019-04-25  8:26         ` Stefan Hajnoczi
2019-04-22  0:48 ` [Qemu-devel] [PATCH v14 2/2] docs: Added MAP_SYNC documentation Wei Yang
2019-04-22  0:48   ` Wei Yang
2019-04-23  9:26   ` Stefan Hajnoczi
2019-04-23  9:26     ` Stefan Hajnoczi
2019-04-23  9:57   ` Pankaj Gupta
2019-04-23  9:57     ` Pankaj Gupta
2019-04-22 12:34 ` [Qemu-devel] [PATCH v14 0/2] support MAP_SYNC for memory-backend-file Michael S. Tsirkin
2019-04-22 12:34   ` Michael S. Tsirkin
2019-04-22 18:22   ` Eduardo Habkost
2019-04-22 18:22     ` Eduardo Habkost
2019-04-23  2:41     ` Wei Yang [this message]
2019-04-23  2:41       ` Wei Yang
2019-04-23 12:43     ` Michael S. Tsirkin
2019-04-23 12:43       ` Michael S. Tsirkin

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=20190423024151.GA10783@richard \
    --to=richardw.yang@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pagupta@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=xiaoguangrong.eric@gmail.com \
    --cc=yi.z.zhang@linux.intel.com \
    --cc=yu.c.zhang@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.