All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Theodore Ts'o <tytso@mit.edu>
Cc: Dan Williams <dan.j.williams@intel.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Yumei Huang <yuhuang@redhat.com>, KVM <kvm@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: DAX can not work on virtual nvdimm device
Date: Thu, 1 Sep 2016 20:57:38 -0600	[thread overview]
Message-ID: <20160902025738.GA26108@linux.intel.com> (raw)
In-Reply-To: <25098f37-53f7-6d5d-0b1a-8469bab51a9f@linux.intel.com>

On Wed, Aug 31, 2016 at 04:44:47PM +0800, Xiao Guangrong wrote:
> On 08/31/2016 01:09 AM, Dan Williams wrote:
> > 
> > Can you post your exact reproduction steps?  This test is not failing for me.
> > 
> 
> Sure.
> 
> 1. make the guest kernel based on your tree, the top commit is
>    10d7902fa0e82b (dax: unmap/truncate on device shutdown) and
>    the config file can be found in this thread.
> 
> 2. add guest kernel command line: memmap=6G!10G
> 
> 3: start the guest:
>    x86_64-softmmu/qemu-system-x86_64 -machine pc,nvdimm --enable-kvm \
>    -smp 16 -m 32G,maxmem=100G,slots=100 /other/VMs/centos6.img -monitor stdio
> 
> 4: in guest:
>    mkfs.ext4 /dev/pmem0
>    mount -o dax /dev/pmem0  /mnt/pmem/
>    echo > /mnt/pmem/xxx
>    ./mmap /mnt/pmem/xxx
>    ./read /mnt/pmem/xxx
> 
>   The source code of mmap and read has been attached in this mail.
> 
>   Hopefully, you can detect the error triggered by read test.
> 
> Thanks!

Okay, I think I've isolated this issue.  Xiao's VM was an old CentOS 6 system,
and for some reason ext4+DAX with the old tools found in that VM fails.  I was
able to reproduce this failure with a freshly installed CentOS 6.8 VM.

You can see the failure with his tests, or perhaps more easily with this
series of commands:

  # mkfs.ext4 /dev/pmem0
  # mount -o dax /dev/pmem0  /mnt/pmem/
  # touch /mnt/pmem/x
  # md5sum /mnt/pmem/x
  md5sum: /mnt/pmem/x: Bad address

This sequence of commands works fine in the old CentOS 6 system if you use XFS
instead of ext4, and it works fine with both ext4 and XFS in CentOS 7 and
with recent versions of Fedora.

I've added the ext4 folks to this mail in case they care, but my guess is that
the tools in CentOS 6 are so old that it's not worth worrying about.  For
reference, the kernel in CentOS 6 is based on 2.6.32.  :)  DAX was introduced
in v4.0.

WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Theodore Ts'o <tytso@mit.edu>
Cc: Yumei Huang <yuhuang@redhat.com>, KVM <kvm@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: DAX can not work on virtual nvdimm device
Date: Thu, 1 Sep 2016 20:57:38 -0600	[thread overview]
Message-ID: <20160902025738.GA26108@linux.intel.com> (raw)
In-Reply-To: <25098f37-53f7-6d5d-0b1a-8469bab51a9f@linux.intel.com>

On Wed, Aug 31, 2016 at 04:44:47PM +0800, Xiao Guangrong wrote:
> On 08/31/2016 01:09 AM, Dan Williams wrote:
> > 
> > Can you post your exact reproduction steps?  This test is not failing for me.
> > 
> 
> Sure.
> 
> 1. make the guest kernel based on your tree, the top commit is
>    10d7902fa0e82b (dax: unmap/truncate on device shutdown) and
>    the config file can be found in this thread.
> 
> 2. add guest kernel command line: memmap=6G!10G
> 
> 3: start the guest:
>    x86_64-softmmu/qemu-system-x86_64 -machine pc,nvdimm --enable-kvm \
>    -smp 16 -m 32G,maxmem=100G,slots=100 /other/VMs/centos6.img -monitor stdio
> 
> 4: in guest:
>    mkfs.ext4 /dev/pmem0
>    mount -o dax /dev/pmem0  /mnt/pmem/
>    echo > /mnt/pmem/xxx
>    ./mmap /mnt/pmem/xxx
>    ./read /mnt/pmem/xxx
> 
>   The source code of mmap and read has been attached in this mail.
> 
>   Hopefully, you can detect the error triggered by read test.
> 
> Thanks!

Okay, I think I've isolated this issue.  Xiao's VM was an old CentOS 6 system,
and for some reason ext4+DAX with the old tools found in that VM fails.  I was
able to reproduce this failure with a freshly installed CentOS 6.8 VM.

You can see the failure with his tests, or perhaps more easily with this
series of commands:

  # mkfs.ext4 /dev/pmem0
  # mount -o dax /dev/pmem0  /mnt/pmem/
  # touch /mnt/pmem/x
  # md5sum /mnt/pmem/x
  md5sum: /mnt/pmem/x: Bad address

This sequence of commands works fine in the old CentOS 6 system if you use XFS
instead of ext4, and it works fine with both ext4 and XFS in CentOS 7 and
with recent versions of Fedora.

I've added the ext4 folks to this mail in case they care, but my guess is that
the tools in CentOS 6 are so old that it's not worth worrying about.  For
reference, the kernel in CentOS 6 is based on 2.6.32.  :)  DAX was introduced
in v4.0.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>,
	"Theodore Ts'o" <tytso@mit.edu>
Cc: Dan Williams <dan.j.williams@intel.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Yumei Huang <yuhuang@redhat.com>, KVM <kvm@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: DAX can not work on virtual nvdimm device
Date: Thu, 1 Sep 2016 20:57:38 -0600	[thread overview]
Message-ID: <20160902025738.GA26108@linux.intel.com> (raw)
In-Reply-To: <25098f37-53f7-6d5d-0b1a-8469bab51a9f@linux.intel.com>

On Wed, Aug 31, 2016 at 04:44:47PM +0800, Xiao Guangrong wrote:
> On 08/31/2016 01:09 AM, Dan Williams wrote:
> > 
> > Can you post your exact reproduction steps?  This test is not failing for me.
> > 
> 
> Sure.
> 
> 1. make the guest kernel based on your tree, the top commit is
>    10d7902fa0e82b (dax: unmap/truncate on device shutdown) and
>    the config file can be found in this thread.
> 
> 2. add guest kernel command line: memmap=6G!10G
> 
> 3: start the guest:
>    x86_64-softmmu/qemu-system-x86_64 -machine pc,nvdimm --enable-kvm \
>    -smp 16 -m 32G,maxmem=100G,slots=100 /other/VMs/centos6.img -monitor stdio
> 
> 4: in guest:
>    mkfs.ext4 /dev/pmem0
>    mount -o dax /dev/pmem0  /mnt/pmem/
>    echo > /mnt/pmem/xxx
>    ./mmap /mnt/pmem/xxx
>    ./read /mnt/pmem/xxx
> 
>   The source code of mmap and read has been attached in this mail.
> 
>   Hopefully, you can detect the error triggered by read test.
> 
> Thanks!

Okay, I think I've isolated this issue.  Xiao's VM was an old CentOS 6 system,
and for some reason ext4+DAX with the old tools found in that VM fails.  I was
able to reproduce this failure with a freshly installed CentOS 6.8 VM.

You can see the failure with his tests, or perhaps more easily with this
series of commands:

  # mkfs.ext4 /dev/pmem0
  # mount -o dax /dev/pmem0  /mnt/pmem/
  # touch /mnt/pmem/x
  # md5sum /mnt/pmem/x
  md5sum: /mnt/pmem/x: Bad address

This sequence of commands works fine in the old CentOS 6 system if you use XFS
instead of ext4, and it works fine with both ext4 and XFS in CentOS 7 and
with recent versions of Fedora.

I've added the ext4 folks to this mail in case they care, but my guess is that
the tools in CentOS 6 are so old that it's not worth worrying about.  For
reference, the kernel in CentOS 6 is based on 2.6.32.  :)  DAX was introduced
in v4.0.

WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Theodore Ts'o <tytso@mit.edu>
Cc: Dan Williams <dan.j.williams@intel.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Yumei Huang <yuhuang@redhat.com>, KVM <kvm@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] DAX can not work on virtual nvdimm device
Date: Thu, 1 Sep 2016 20:57:38 -0600	[thread overview]
Message-ID: <20160902025738.GA26108@linux.intel.com> (raw)
In-Reply-To: <25098f37-53f7-6d5d-0b1a-8469bab51a9f@linux.intel.com>

On Wed, Aug 31, 2016 at 04:44:47PM +0800, Xiao Guangrong wrote:
> On 08/31/2016 01:09 AM, Dan Williams wrote:
> > 
> > Can you post your exact reproduction steps?  This test is not failing for me.
> > 
> 
> Sure.
> 
> 1. make the guest kernel based on your tree, the top commit is
>    10d7902fa0e82b (dax: unmap/truncate on device shutdown) and
>    the config file can be found in this thread.
> 
> 2. add guest kernel command line: memmap=6G!10G
> 
> 3: start the guest:
>    x86_64-softmmu/qemu-system-x86_64 -machine pc,nvdimm --enable-kvm \
>    -smp 16 -m 32G,maxmem=100G,slots=100 /other/VMs/centos6.img -monitor stdio
> 
> 4: in guest:
>    mkfs.ext4 /dev/pmem0
>    mount -o dax /dev/pmem0  /mnt/pmem/
>    echo > /mnt/pmem/xxx
>    ./mmap /mnt/pmem/xxx
>    ./read /mnt/pmem/xxx
> 
>   The source code of mmap and read has been attached in this mail.
> 
>   Hopefully, you can detect the error triggered by read test.
> 
> Thanks!

Okay, I think I've isolated this issue.  Xiao's VM was an old CentOS 6 system,
and for some reason ext4+DAX with the old tools found in that VM fails.  I was
able to reproduce this failure with a freshly installed CentOS 6.8 VM.

You can see the failure with his tests, or perhaps more easily with this
series of commands:

  # mkfs.ext4 /dev/pmem0
  # mount -o dax /dev/pmem0  /mnt/pmem/
  # touch /mnt/pmem/x
  # md5sum /mnt/pmem/x
  md5sum: /mnt/pmem/x: Bad address

This sequence of commands works fine in the old CentOS 6 system if you use XFS
instead of ext4, and it works fine with both ext4 and XFS in CentOS 7 and
with recent versions of Fedora.

I've added the ext4 folks to this mail in case they care, but my guess is that
the tools in CentOS 6 are so old that it's not worth worrying about.  For
reference, the kernel in CentOS 6 is based on 2.6.32.  :)  DAX was introduced
in v4.0.

  parent reply	other threads:[~2016-09-02  2:57 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19 11:19 DAX can not work on virtual nvdimm device Xiao Guangrong
2016-08-19 11:19 ` [Qemu-devel] " Xiao Guangrong
2016-08-19 11:19 ` Xiao Guangrong
2016-08-19 11:19 ` Xiao Guangrong
2016-08-19 14:59 ` Dan Williams
2016-08-19 14:59   ` [Qemu-devel] " Dan Williams
2016-08-19 14:59   ` Dan Williams
2016-08-19 14:59   ` Dan Williams
     [not found]   ` <CAPcyv4hVgi6Hw8Beg=Nt78+U0QNJN9mBGWEp3V6bg86NaM3Q6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-19 18:30     ` Ross Zwisler
2016-08-19 18:30       ` [Qemu-devel] " Ross Zwisler
2016-08-19 18:30       ` Ross Zwisler
2016-08-19 18:30       ` Ross Zwisler
     [not found]       ` <20160819183047.GA7216-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-08-21  9:55         ` Boaz Harrosh
2016-08-21  9:55           ` [Qemu-devel] " Boaz Harrosh
2016-08-21  9:55           ` Boaz Harrosh
2016-08-21  9:55           ` Boaz Harrosh
2016-08-29  7:54         ` Xiao Guangrong
2016-08-29  7:54           ` [Qemu-devel] " Xiao Guangrong
2016-08-29  7:54           ` Xiao Guangrong
2016-08-29  7:54           ` Xiao Guangrong
     [not found]           ` <600ac51c-0f61-6e53-9bfa-669c85494d1f-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-08-29 19:30             ` Ross Zwisler
2016-08-29 19:30               ` [Qemu-devel] " Ross Zwisler
2016-08-29 19:30               ` Ross Zwisler
2016-08-29 19:30               ` Ross Zwisler
     [not found]               ` <20160829193014.GB16738-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-08-30  6:53                 ` Xiao Guangrong
2016-08-30  6:53                   ` [Qemu-devel] " Xiao Guangrong
2016-08-30  6:53                   ` Xiao Guangrong
2016-08-30  6:53                   ` Xiao Guangrong
2016-08-30 17:09                   ` Dan Williams
2016-08-30 17:09                     ` [Qemu-devel] " Dan Williams
2016-08-30 17:09                     ` Dan Williams
2016-08-30 17:09                     ` Dan Williams
     [not found]                     ` <CAPcyv4hrFSxNcmmVLVZT4fK3+hspPCDKW0rVBj1=3GkJRgZ29Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-31  8:44                       ` Xiao Guangrong
2016-08-31  8:44                         ` [Qemu-devel] " Xiao Guangrong
2016-08-31  8:44                         ` Xiao Guangrong
2016-08-31  8:44                         ` Xiao Guangrong
     [not found]                         ` <25098f37-53f7-6d5d-0b1a-8469bab51a9f-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-08-31 16:46                           ` Ross Zwisler
2016-08-31 16:46                             ` [Qemu-devel] " Ross Zwisler
2016-08-31 16:46                             ` Ross Zwisler
2016-08-31 16:46                             ` Ross Zwisler
2016-09-02  2:57                         ` Ross Zwisler [this message]
2016-09-02  2:57                           ` [Qemu-devel] " Ross Zwisler
2016-09-02  2:57                           ` Ross Zwisler
2016-09-02  2:57                           ` Ross Zwisler
     [not found]                           ` <20160902025738.GA26108-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-09-06 15:06                             ` Jan Kara
2016-09-06 15:06                               ` [Qemu-devel] " Jan Kara
2016-09-06 15:06                               ` Jan Kara
2016-09-06 15:06                               ` Jan Kara
     [not found]                               ` <20160906150620.GJ28922-4I4JzKEfoa/jFM9bn6wA6Q@public.gmane.org>
2016-09-08 20:47                                 ` Ross Zwisler
2016-09-08 20:47                                   ` [Qemu-devel] " Ross Zwisler
2016-09-08 20:47                                   ` Ross Zwisler
2016-09-08 20:47                                   ` Ross Zwisler
     [not found]                                   ` <20160908204708.GA15167-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-09-09  9:19                                     ` Jan Kara
2016-09-09  9:19                                       ` [Qemu-devel] " Jan Kara
2016-09-09  9:19                                       ` Jan Kara
2016-09-09  9:19                                       ` Jan Kara
     [not found]                                       ` <20160909091925.GF22777-4I4JzKEfoa/jFM9bn6wA6Q@public.gmane.org>
2016-09-09 14:03                                         ` Theodore Ts'o
2016-09-09 14:03                                           ` [Qemu-devel] " Theodore Ts'o
2016-09-09 14:03                                           ` Theodore Ts'o
2016-09-09 14:03                                           ` Theodore Ts'o
     [not found]                                           ` <20160909140327.r2j64s5xdaxnnxhx-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2016-09-09 16:34                                             ` Ross Zwisler
2016-09-09 16:34                                               ` [Qemu-devel] " Ross Zwisler
2016-09-09 16:34                                               ` Ross Zwisler
2016-09-09 16:34                                               ` Ross Zwisler

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=20160902025738.GA26108@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=jack@suse.cz \
    --cc=kvm@vger.kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=tytso@mit.edu \
    --cc=yuhuang@redhat.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.