All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
	Eryu Guan <eguan@redhat.com>,
	fstests@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Dan Williams <dan.j.williams@intel.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-nvdimm@lists.01.org, linux-ext4@vger.kernel.org
Subject: Re: [fstests PATCH v2 2/2] generic/999: test DAX DMA vs truncate/hole-punch
Date: Mon, 16 Jul 2018 10:07:49 -0600	[thread overview]
Message-ID: <20180716160749.GB2287@linux.intel.com> (raw)
In-Reply-To: <20180714014105.GY2234@dastard>

On Sat, Jul 14, 2018 at 11:41:05AM +1000, Dave Chinner wrote:
> On Tue, Jul 10, 2018 at 04:09:42PM -0600, Ross Zwisler wrote:
> > This adds a regression test for the following series:
> > 
> > https://lists.01.org/pipermail/linux-nvdimm/2018-July/016842.html
> > 
> > which adds synchronization between DAX DMA in ext4 and truncate/hole-punch.
> > The intention of the test is to test those specific changes, but it runs
> > fine both with XFS and without DAX so I've put it in the generic tests
> > instead of ext4 and not restricted it to only DAX configurations.
> > 
> > When run with v4.18-rc4 + DAX + ext4, this test will hit the following
> > WARN_ON_ONCE() in dax_disassociate_entry():
> > 
> > 	WARN_ON_ONCE(trunc && page_ref_count(page) > 1);
> > 
> > If you change this to a WARN_ON() instead, you can see that each of the
> > four paths being exercised in this test hits that condition many times in
> > the one second that the subtest is being run.
> > 
> > Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
> 
> just a FWIW:
> 
> > +int main(int argc, char *argv[])
> > +{
> > +	int err;
> > +
> > +	if (argc != 3) {
> > +		printf("Usage: %s <dax file> <non-dax file>\n",
> > +				basename(argv[0]));
> > +		exit(0);
> > +	}
> 
> This is an example of why we should be supporting per-inode DAX
> enablement in all filesystems, not a global mount option....
> 
> > +_supported_fs generic
> > +_supported_os Linux
> > +_require_test
> > +_require_test_program "t_mmap_collision"
> > +
> > +# To get the failure we turn off DAX on our SCRATCH_MNT so we can get O_DIRECT
> > +# behavior.  We will continue to use unmodified mount options for the test
> > +# TEST_DIR.  The failures fixed by the above mentioned kernel patch trigger
> > +# when those mount options include "-o dax", but the test runs fine without
> > +# that option so we don't require it.
> > +export MOUNT_OPTIONS=""
> > +_scratch_unmount >> $seqres.full 2>&1
> > +_scratch_mount >> $seqres.full 2>&1
> 
> And then all this crap would go away....

Yep, I totally agree. :)

WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>
Cc: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>,
	Eryu Guan <eguan-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org,
	fstests-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [fstests PATCH v2 2/2] generic/999: test DAX DMA vs truncate/hole-punch
Date: Mon, 16 Jul 2018 10:07:49 -0600	[thread overview]
Message-ID: <20180716160749.GB2287@linux.intel.com> (raw)
In-Reply-To: <20180714014105.GY2234@dastard>

On Sat, Jul 14, 2018 at 11:41:05AM +1000, Dave Chinner wrote:
> On Tue, Jul 10, 2018 at 04:09:42PM -0600, Ross Zwisler wrote:
> > This adds a regression test for the following series:
> > 
> > https://lists.01.org/pipermail/linux-nvdimm/2018-July/016842.html
> > 
> > which adds synchronization between DAX DMA in ext4 and truncate/hole-punch.
> > The intention of the test is to test those specific changes, but it runs
> > fine both with XFS and without DAX so I've put it in the generic tests
> > instead of ext4 and not restricted it to only DAX configurations.
> > 
> > When run with v4.18-rc4 + DAX + ext4, this test will hit the following
> > WARN_ON_ONCE() in dax_disassociate_entry():
> > 
> > 	WARN_ON_ONCE(trunc && page_ref_count(page) > 1);
> > 
> > If you change this to a WARN_ON() instead, you can see that each of the
> > four paths being exercised in this test hits that condition many times in
> > the one second that the subtest is being run.
> > 
> > Signed-off-by: Ross Zwisler <ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> 
> just a FWIW:
> 
> > +int main(int argc, char *argv[])
> > +{
> > +	int err;
> > +
> > +	if (argc != 3) {
> > +		printf("Usage: %s <dax file> <non-dax file>\n",
> > +				basename(argv[0]));
> > +		exit(0);
> > +	}
> 
> This is an example of why we should be supporting per-inode DAX
> enablement in all filesystems, not a global mount option....
> 
> > +_supported_fs generic
> > +_supported_os Linux
> > +_require_test
> > +_require_test_program "t_mmap_collision"
> > +
> > +# To get the failure we turn off DAX on our SCRATCH_MNT so we can get O_DIRECT
> > +# behavior.  We will continue to use unmodified mount options for the test
> > +# TEST_DIR.  The failures fixed by the above mentioned kernel patch trigger
> > +# when those mount options include "-o dax", but the test runs fine without
> > +# that option so we don't require it.
> > +export MOUNT_OPTIONS=""
> > +_scratch_unmount >> $seqres.full 2>&1
> > +_scratch_mount >> $seqres.full 2>&1
> 
> And then all this crap would go away....

Yep, I totally agree. :)

WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Jan Kara <jack@suse.cz>, Eryu Guan <eguan@redhat.com>,
	linux-nvdimm@lists.01.org, fstests@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>,
	linux-ext4@vger.kernel.org
Subject: Re: [fstests PATCH v2 2/2] generic/999: test DAX DMA vs truncate/hole-punch
Date: Mon, 16 Jul 2018 10:07:49 -0600	[thread overview]
Message-ID: <20180716160749.GB2287@linux.intel.com> (raw)
In-Reply-To: <20180714014105.GY2234@dastard>

On Sat, Jul 14, 2018 at 11:41:05AM +1000, Dave Chinner wrote:
> On Tue, Jul 10, 2018 at 04:09:42PM -0600, Ross Zwisler wrote:
> > This adds a regression test for the following series:
> > 
> > https://lists.01.org/pipermail/linux-nvdimm/2018-July/016842.html
> > 
> > which adds synchronization between DAX DMA in ext4 and truncate/hole-punch.
> > The intention of the test is to test those specific changes, but it runs
> > fine both with XFS and without DAX so I've put it in the generic tests
> > instead of ext4 and not restricted it to only DAX configurations.
> > 
> > When run with v4.18-rc4 + DAX + ext4, this test will hit the following
> > WARN_ON_ONCE() in dax_disassociate_entry():
> > 
> > 	WARN_ON_ONCE(trunc && page_ref_count(page) > 1);
> > 
> > If you change this to a WARN_ON() instead, you can see that each of the
> > four paths being exercised in this test hits that condition many times in
> > the one second that the subtest is being run.
> > 
> > Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
> 
> just a FWIW:
> 
> > +int main(int argc, char *argv[])
> > +{
> > +	int err;
> > +
> > +	if (argc != 3) {
> > +		printf("Usage: %s <dax file> <non-dax file>\n",
> > +				basename(argv[0]));
> > +		exit(0);
> > +	}
> 
> This is an example of why we should be supporting per-inode DAX
> enablement in all filesystems, not a global mount option....
> 
> > +_supported_fs generic
> > +_supported_os Linux
> > +_require_test
> > +_require_test_program "t_mmap_collision"
> > +
> > +# To get the failure we turn off DAX on our SCRATCH_MNT so we can get O_DIRECT
> > +# behavior.  We will continue to use unmodified mount options for the test
> > +# TEST_DIR.  The failures fixed by the above mentioned kernel patch trigger
> > +# when those mount options include "-o dax", but the test runs fine without
> > +# that option so we don't require it.
> > +export MOUNT_OPTIONS=""
> > +_scratch_unmount >> $seqres.full 2>&1
> > +_scratch_mount >> $seqres.full 2>&1
> 
> And then all this crap would go away....

Yep, I totally agree. :)
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2018-07-16 16:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 22:09 [fstests PATCH v2 0/2] Add test for DAX+ext4+DMA race Ross Zwisler
2018-07-10 22:09 ` Ross Zwisler
2018-07-10 22:09 ` Ross Zwisler
2018-07-10 22:09 ` [fstests PATCH v2 1/2] src/: add license and copyright info to files Ross Zwisler
2018-07-10 22:09   ` Ross Zwisler
2018-07-10 22:09   ` Ross Zwisler
2018-07-14 12:54   ` Eryu Guan
2018-07-14 12:54     ` Eryu Guan
2018-07-14 12:54     ` Eryu Guan
2018-07-10 22:09 ` [fstests PATCH v2 2/2] generic/999: test DAX DMA vs truncate/hole-punch Ross Zwisler
2018-07-10 22:09   ` Ross Zwisler
2018-07-10 22:09   ` Ross Zwisler
2018-07-14  1:41   ` Dave Chinner
2018-07-14  1:41     ` Dave Chinner
2018-07-14  1:41     ` Dave Chinner
2018-07-16 16:07     ` Ross Zwisler [this message]
2018-07-16 16:07       ` Ross Zwisler
2018-07-16 16:07       ` Ross Zwisler
2018-07-14 12:53   ` Eryu Guan
2018-07-14 12:53     ` Eryu Guan
2018-07-14 12:53     ` Eryu Guan
2018-07-27 21:12     ` [fstests PATCH v3] " Ross Zwisler
2018-07-27 21:12       ` Ross Zwisler
2018-07-27 21:12       ` 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=20180716160749.GB2287@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@fromorbit.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.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 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.