From: Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>
To: "Kani, Toshimitsu" <toshi.kani-ZPxbGqLxI0U@public.gmane.org>
Cc: "jack-AlSwsSmVLrQ@public.gmane.org"
<jack-AlSwsSmVLrQ@public.gmane.org>,
"linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
<linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>,
"xfs-VZNHf3L845pBDgjK7y7TUQ@public.gmane.org"
<xfs-VZNHf3L845pBDgjK7y7TUQ@public.gmane.org>,
"linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Subtle races between DAX mmap fault and write path
Date: Fri, 5 Aug 2016 21:27:39 +1000 [thread overview]
Message-ID: <20160805112739.GG16044@dastard> (raw)
In-Reply-To: <1470335997.8908.128.camel-ZPxbGqLxI0U@public.gmane.org>
[ cut to just the important points ]
On Thu, Aug 04, 2016 at 06:40:42PM +0000, Kani, Toshimitsu wrote:
> On Tue, 2016-08-02 at 10:21 +1000, Dave Chinner wrote:
> > If I drop the fsync from the
> > buffered IO path, bandwidth remains the same but runtime drops to
> > 0.55-0.57s, so again the buffered IO write path is faster than DAX
> > while doing more work.
>
> I do not think the test results are relevant on this point because both
> buffered and dax write() paths use uncached copy to avoid clflush. The
> buffered path uses cached copy to the page cache and then use uncached copy to
> PMEM via writeback. Therefore, the buffered IO path also benefits from using
> uncached copy to avoid clflush.
Except that I tested without the writeback path for buffered IO, so
there was a direct comparison for single cached copy vs single
uncached copy.
The undenial fact is that a write() with a single cached copy with
all the overhead of dirty page tracking is /faster/ than a much
shorter, simpler IO path that uses an uncached copy. That's what the
numbers say....
> Cached copy (req movq) is slightly faster than uncached copy,
Not according to Boaz - he claims that uncached is 20% faster than
cached. How about you two get together, do some benchmarking and get
your story straight, eh?
> and should be
> used for writing to the page cache. For writing to PMEM, however, additional
> clflush can be expensive, and allocating cachelines for PMEM leads to evict
> application's cachelines.
I keep hearing people tell me why cached copies are slower, but
no-one is providing numbers to back up their statements. The only
numbers we have are the ones I've published showing cached copies w/
full dirty tracking is faster than uncached copy w/o dirty tracking.
Show me the numbers that back up your statements, then I'll listen
to you.
-Dave.
--
Dave Chinner
david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org
WARNING: multiple messages have this Message-ID (diff)
From: Dave Chinner <david@fromorbit.com>
To: "Kani, Toshimitsu" <toshi.kani@hpe.com>
Cc: "jack@suse.cz" <jack@suse.cz>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"xfs@oss.sgi.com" <xfs@oss.sgi.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: Subtle races between DAX mmap fault and write path
Date: Fri, 5 Aug 2016 21:27:39 +1000 [thread overview]
Message-ID: <20160805112739.GG16044@dastard> (raw)
In-Reply-To: <1470335997.8908.128.camel@hpe.com>
[ cut to just the important points ]
On Thu, Aug 04, 2016 at 06:40:42PM +0000, Kani, Toshimitsu wrote:
> On Tue, 2016-08-02 at 10:21 +1000, Dave Chinner wrote:
> > If I drop the fsync from the
> > buffered IO path, bandwidth remains the same but runtime drops to
> > 0.55-0.57s, so again the buffered IO write path is faster than DAX
> > while doing more work.
>
> I do not think the test results are relevant on this point because both
> buffered and dax write() paths use uncached copy to avoid clflush. The
> buffered path uses cached copy to the page cache and then use uncached copy to
> PMEM via writeback. Therefore, the buffered IO path also benefits from using
> uncached copy to avoid clflush.
Except that I tested without the writeback path for buffered IO, so
there was a direct comparison for single cached copy vs single
uncached copy.
The undenial fact is that a write() with a single cached copy with
all the overhead of dirty page tracking is /faster/ than a much
shorter, simpler IO path that uses an uncached copy. That's what the
numbers say....
> Cached copy (req movq) is slightly faster than uncached copy,
Not according to Boaz - he claims that uncached is 20% faster than
cached. How about you two get together, do some benchmarking and get
your story straight, eh?
> and should be
> used for writing to the page cache. For writing to PMEM, however, additional
> clflush can be expensive, and allocating cachelines for PMEM leads to evict
> application's cachelines.
I keep hearing people tell me why cached copies are slower, but
no-one is providing numbers to back up their statements. The only
numbers we have are the ones I've published showing cached copies w/
full dirty tracking is faster than uncached copy w/o dirty tracking.
Show me the numbers that back up your statements, then I'll listen
to you.
-Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
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: Dave Chinner <david@fromorbit.com>
To: "Kani, Toshimitsu" <toshi.kani@hpe.com>
Cc: "boaz@plexistor.com" <boaz@plexistor.com>,
"jack@suse.cz" <jack@suse.cz>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"xfs@oss.sgi.com" <xfs@oss.sgi.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: Subtle races between DAX mmap fault and write path
Date: Fri, 5 Aug 2016 21:27:39 +1000 [thread overview]
Message-ID: <20160805112739.GG16044@dastard> (raw)
In-Reply-To: <1470335997.8908.128.camel@hpe.com>
[ cut to just the important points ]
On Thu, Aug 04, 2016 at 06:40:42PM +0000, Kani, Toshimitsu wrote:
> On Tue, 2016-08-02 at 10:21 +1000, Dave Chinner wrote:
> > If I drop the fsync from the
> > buffered IO path, bandwidth remains the same but runtime drops to
> > 0.55-0.57s, so again the buffered IO write path is faster than DAX
> > while doing more work.
>
> I do not think the test results are relevant on this point because both
> buffered and dax write() paths use uncached copy to avoid clflush. The
> buffered path uses cached copy to the page cache and then use uncached copy to
> PMEM via writeback. Therefore, the buffered IO path also benefits from using
> uncached copy to avoid clflush.
Except that I tested without the writeback path for buffered IO, so
there was a direct comparison for single cached copy vs single
uncached copy.
The undenial fact is that a write() with a single cached copy with
all the overhead of dirty page tracking is /faster/ than a much
shorter, simpler IO path that uses an uncached copy. That's what the
numbers say....
> Cached copy (req movq) is slightly faster than uncached copy,
Not according to Boaz - he claims that uncached is 20% faster than
cached. How about you two get together, do some benchmarking and get
your story straight, eh?
> and should be
> used for writing to the page cache. For writing to PMEM, however, additional
> clflush can be expensive, and allocating cachelines for PMEM leads to evict
> application's cachelines.
I keep hearing people tell me why cached copies are slower, but
no-one is providing numbers to back up their statements. The only
numbers we have are the ones I've published showing cached copies w/
full dirty tracking is faster than uncached copy w/o dirty tracking.
Show me the numbers that back up your statements, then I'll listen
to you.
-Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
WARNING: multiple messages have this Message-ID (diff)
From: Dave Chinner <david@fromorbit.com>
To: "Kani, Toshimitsu" <toshi.kani@hpe.com>
Cc: "boaz@plexistor.com" <boaz@plexistor.com>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
"jack@suse.cz" <jack@suse.cz>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"xfs@oss.sgi.com" <xfs@oss.sgi.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: Subtle races between DAX mmap fault and write path
Date: Fri, 5 Aug 2016 21:27:39 +1000 [thread overview]
Message-ID: <20160805112739.GG16044@dastard> (raw)
In-Reply-To: <1470335997.8908.128.camel@hpe.com>
[ cut to just the important points ]
On Thu, Aug 04, 2016 at 06:40:42PM +0000, Kani, Toshimitsu wrote:
> On Tue, 2016-08-02 at 10:21 +1000, Dave Chinner wrote:
> > If I drop the fsync from the
> > buffered IO path, bandwidth remains the same but runtime drops to
> > 0.55-0.57s, so again the buffered IO write path is faster than DAX
> > while doing more work.
>
> I do not think the test results are relevant on this point because both
> buffered and dax write() paths use uncached copy to avoid clflush. �The
> buffered path uses cached copy to the page cache and then use uncached copy to
> PMEM via writeback. �Therefore, the buffered IO path also benefits from using
> uncached copy to avoid clflush.
Except that I tested without the writeback path for buffered IO, so
there was a direct comparison for single cached copy vs single
uncached copy.
The undenial fact is that a write() with a single cached copy with
all the overhead of dirty page tracking is /faster/ than a much
shorter, simpler IO path that uses an uncached copy. That's what the
numbers say....
> Cached copy (req movq) is slightly faster than uncached copy,
Not according to Boaz - he claims that uncached is 20% faster than
cached. How about you two get together, do some benchmarking and get
your story straight, eh?
> and should be
> used for writing to the page cache. �For writing to PMEM, however, additional
> clflush can be expensive, and allocating cachelines for PMEM leads to evict
> application's cachelines.
I keep hearing people tell me why cached copies are slower, but
no-one is providing numbers to back up their statements. The only
numbers we have are the ones I've published showing cached copies w/
full dirty tracking is faster than uncached copy w/o dirty tracking.
Show me the numbers that back up your statements, then I'll listen
to you.
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2016-08-05 11:27 UTC|newest]
Thread overview: 112+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 12:07 Subtle races between DAX mmap fault and write path Jan Kara
2016-07-27 12:07 ` Jan Kara
2016-07-27 12:07 ` Jan Kara
2016-07-27 21:10 ` Ross Zwisler
2016-07-27 21:10 ` Ross Zwisler
2016-07-27 21:10 ` Ross Zwisler
2016-07-27 22:19 ` Dave Chinner
2016-07-27 22:19 ` Dave Chinner
2016-07-27 22:19 ` Dave Chinner
2016-07-28 8:10 ` Jan Kara
2016-07-28 8:10 ` Jan Kara
2016-07-28 8:10 ` Jan Kara
2016-07-28 8:10 ` Jan Kara
[not found] ` <20160728081033.GC4094-4I4JzKEfoa/jFM9bn6wA6Q@public.gmane.org>
2016-07-29 2:21 ` Dave Chinner
2016-07-29 2:21 ` Dave Chinner
2016-07-29 2:21 ` Dave Chinner
2016-07-29 2:21 ` Dave Chinner
2016-07-29 14:44 ` Dan Williams
2016-07-29 14:44 ` Dan Williams
2016-07-29 14:44 ` Dan Williams
[not found] ` <CAPcyv4gOcDGzikJHYGxNXtYqQKkPUgkG+z4ASxogQUnp1zmD2g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-30 0:12 ` Dave Chinner
2016-07-30 0:12 ` Dave Chinner
2016-07-30 0:12 ` Dave Chinner
2016-07-30 0:12 ` Dave Chinner
2016-07-30 0:53 ` Dan Williams
2016-07-30 0:53 ` Dan Williams
2016-07-30 0:53 ` Dan Williams
2016-07-30 0:53 ` Dan Williams
2016-08-01 1:46 ` Dave Chinner
2016-08-01 1:46 ` Dave Chinner
2016-08-01 1:46 ` Dave Chinner
2016-08-01 3:13 ` Keith Packard
2016-08-01 3:13 ` Keith Packard
2016-08-01 3:13 ` Keith Packard
[not found] ` <86k2g15gh8.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2016-08-01 4:07 ` Dave Chinner
2016-08-01 4:07 ` Dave Chinner
2016-08-01 4:07 ` Dave Chinner
2016-08-01 4:07 ` Dave Chinner
2016-08-01 4:39 ` Dan Williams
2016-08-01 4:39 ` Dan Williams
2016-08-01 4:39 ` Dan Williams
2016-08-01 4:39 ` Dan Williams
2016-08-01 7:39 ` Dave Chinner
2016-08-01 7:39 ` Dave Chinner
2016-08-01 7:39 ` Dave Chinner
2016-08-01 7:39 ` Dave Chinner
2016-08-01 10:13 ` Boaz Harrosh
2016-08-01 10:13 ` Boaz Harrosh
2016-08-01 10:13 ` Boaz Harrosh
2016-08-01 10:13 ` Boaz Harrosh
[not found] ` <579F20D9.80107-/8YdC2HfS5554TAoqtyWWQ@public.gmane.org>
2016-08-02 0:21 ` Dave Chinner
2016-08-02 0:21 ` Dave Chinner
2016-08-02 0:21 ` Dave Chinner
2016-08-02 0:21 ` Dave Chinner
2016-08-04 18:40 ` Kani, Toshimitsu
2016-08-04 18:40 ` Kani, Toshimitsu
2016-08-04 18:40 ` Kani, Toshimitsu
2016-08-04 18:40 ` Kani, Toshimitsu
[not found] ` <1470335997.8908.128.camel-ZPxbGqLxI0U@public.gmane.org>
2016-08-05 11:27 ` Dave Chinner [this message]
2016-08-05 11:27 ` Dave Chinner
2016-08-05 11:27 ` Dave Chinner
2016-08-05 11:27 ` Dave Chinner
2016-08-05 15:18 ` Kani, Toshimitsu
2016-08-05 15:18 ` Kani, Toshimitsu
2016-08-05 15:18 ` Kani, Toshimitsu
2016-08-05 15:18 ` Kani, Toshimitsu
2016-08-05 19:58 ` Boylston, Brian
2016-08-05 19:58 ` Boylston, Brian
2016-08-05 19:58 ` Boylston, Brian
2016-08-05 19:58 ` Boylston, Brian
[not found] ` <CS1PR84MB0119314ACA9B4823C0FE33318E180-v3YevoQr3hP2N4EGskIB0ticc1VoeDReZmpNikb/MY7jO8Y7rvWZVA@public.gmane.org>
2016-08-08 9:26 ` Jan Kara
2016-08-08 9:26 ` Jan Kara
2016-08-08 9:26 ` Jan Kara
2016-08-08 9:26 ` Jan Kara
[not found] ` <20160808092655.GA29128-4I4JzKEfoa/jFM9bn6wA6Q@public.gmane.org>
2016-08-08 12:30 ` Boylston, Brian
2016-08-08 12:30 ` Boylston, Brian
2016-08-08 12:30 ` Boylston, Brian
2016-08-08 12:30 ` Boylston, Brian
2016-08-08 13:11 ` Christoph Hellwig
2016-08-08 13:11 ` Christoph Hellwig
2016-08-08 13:11 ` Christoph Hellwig
[not found] ` <CS1PR84MB0119ACB424699154BDA197B28E1B0-v3YevoQr3hP2N4EGskIB0ticc1VoeDReZmpNikb/MY7jO8Y7rvWZVA@public.gmane.org>
2016-08-08 18:28 ` Jan Kara
2016-08-08 18:28 ` Jan Kara
2016-08-08 18:28 ` Jan Kara
2016-08-08 18:28 ` Jan Kara
[not found] ` <20160808182827.GI29128-4I4JzKEfoa/jFM9bn6wA6Q@public.gmane.org>
2016-08-08 19:32 ` Kani, Toshimitsu
2016-08-08 19:32 ` Kani, Toshimitsu
2016-08-08 19:32 ` Kani, Toshimitsu
2016-08-08 19:32 ` Kani, Toshimitsu
2016-08-08 23:12 ` Dave Chinner
2016-08-08 23:12 ` Dave Chinner
2016-08-08 23:12 ` Dave Chinner
2016-08-08 23:12 ` Dave Chinner
2016-08-09 1:00 ` Kani, Toshimitsu
2016-08-09 1:00 ` Kani, Toshimitsu
2016-08-09 1:00 ` Kani, Toshimitsu
2016-08-09 1:00 ` Kani, Toshimitsu
[not found] ` <1470704418.32015.51.camel-ZPxbGqLxI0U@public.gmane.org>
2016-08-09 5:58 ` Dave Chinner
2016-08-09 5:58 ` Dave Chinner
2016-08-09 5:58 ` Dave Chinner
2016-08-09 5:58 ` Dave Chinner
2016-08-01 17:47 ` Dan Williams
2016-08-01 17:47 ` Dan Williams
2016-08-01 17:47 ` Dan Williams
2016-08-01 17:47 ` Dan Williams
2016-07-28 8:47 ` Jan Kara
2016-07-28 8:47 ` Jan Kara
2016-07-28 8:47 ` Jan Kara
[not found] ` <20160727120745.GI6860-4I4JzKEfoa/jFM9bn6wA6Q@public.gmane.org>
2016-07-27 21:38 ` Dan Williams
2016-07-27 21:38 ` Dan Williams
2016-07-27 21:38 ` Dan Williams
2016-07-27 21:38 ` Dan Williams
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=20160805112739.GG16044@dastard \
--to=david-fqsqvqoi3ljby3ivrkzq2a@public.gmane.org \
--cc=jack-AlSwsSmVLrQ@public.gmane.org \
--cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
--cc=toshi.kani-ZPxbGqLxI0U@public.gmane.org \
--cc=xfs-VZNHf3L845pBDgjK7y7TUQ@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 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.