xfs
[Top] [All Lists]

Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io

To: Jeff Moyer <jmoyer@xxxxxxxxxx>
Subject: Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io
From: Dan Williams <dan.j.williams@xxxxxxxxx>
Date: Mon, 2 May 2016 10:53:25 -0700
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, "Verma, Vishal L" <vishal.l.verma@xxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-block@xxxxxxxxxxxxxxx" <linux-block@xxxxxxxxxxxxxxx>, "hch@xxxxxxxxxxxxx" <hch@xxxxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, "linux-nvdimm@xxxxxxxxxxx" <linux-nvdimm@xxxxxxxxxxx>, "linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>, "viro@xxxxxxxxxxxxxxxxxx" <viro@xxxxxxxxxxxxxxxxxx>, "axboe@xxxxxx" <axboe@xxxxxx>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, "linux-ext4@xxxxxxxxxxxxxxx" <linux-ext4@xxxxxxxxxxxxxxx>, "Wilcox, Matthew R" <matthew.r.wilcox@xxxxxxxxx>, "jack@xxxxxxx" <jack@xxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=LeS2Cru1VZFqI4YqWf6DszFVSzBFSfVRfLmEfm9hHvc=; b=iKczvBmFNf13Itt8KiOv+B5+XYqXkWSbeNfMFOoXx5/QUvOIlYKIEdZi4qh8qVp6Gy kV/BP2m0jAAXmcplGujTmyyvvXp33UvPX0Q/P4yE2jFX/XORlfxgMHd43OvvVeEO6s+o 5PyN3ayqLWCw2l6CmsQSL0gbsIPwj7j5VdSl377AKjZCvDy8MPtXr3z//9mtsWQwmdtC BmO/QrQVs2S2fehdhBzbZnff65heDWP+0C2c0T3lRBR8ypxx0DCjygCdke8/GF/ZahU4 I0YrKoroVXLq7V3p3WyFBxELAarvZq06WM1k3OpWD36CxdzE4Vzg3n7xkkXFOMpSCsk/ dVkw==
In-reply-to: <x49pot4ebeb.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <1459303190-20072-1-git-send-email-vishal.l.verma@xxxxxxxxx> <1459303190-20072-6-git-send-email-vishal.l.verma@xxxxxxxxx> <x49twj26edj.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160420205923.GA24797@xxxxxxxxxxxxx> <1461434916.3695.7.camel@xxxxxxxxx> <20160425083114.GA27556@xxxxxxxxxxxxx> <1461604476.3106.12.camel@xxxxxxxxx> <20160425232552.GD18496@dastard> <1461628381.1421.24.camel@xxxxxxxxx> <20160426004155.GF18496@dastard> <x49pot4ebeb.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Mon, May 2, 2016 at 8:18 AM, Jeff Moyer <jmoyer@xxxxxxxxxx> wrote:
> Dave Chinner <david@xxxxxxxxxxxxx> writes:
[..]
>> We need some form of redundancy and correction in the PMEM stack to
>> prevent single sector errors from taking down services until an
>> administrator can correct the problem. I'm trying to understand
>> where this is supposed to fit into the picture - at this point I
>> really don't think userspace applications are going to be able to do
>> this reliably....
>
> Not all storage is configured into a RAID volume, and in some instances,
> the application is better positioned to recover the data (gluster/ceph,
> for example).  It really comes down to whether applications or libraries
> will want to implement redundancy themselves in order to get a bump in
> performance by not going through the kernel.  And I think I know what
> your opinion is on that front.  :-)
>
> Speaking of which, did you see the numbers Dan shared at LSF on how much
> overhead there is in calling into the kernel for syncing?  Dan, can/did
> you publish that spreadsheet somewhere?

Here it is:

https://docs.google.com/spreadsheets/d/1pwr9psy6vtB9DOsc2bUdXevJRz5Guf6laZ4DaZlkhoo/edit?usp=sharing

On the "Filtered" tab I have some of the comparisons where:

noop => don't call msync and don't flush caches in userspace

persist => cache flushing only in userspace and only on individual cache lines

persist_4k => cache flushing only in userspace, but flushing is
performed in 4K aligned units

msync => same granularity flushing as the 'persist' case, but the
kernel internally promotes this to a 4K sized / aligned flush

msync_0 => synthetic case where msync() returns immediately and does
no other work

The takeaway is that msync() is 9-10x slower than userspace cache management.

Let me know if there are any questions and I can add an NVML developer
to this thread...

<Prev in Thread] Current Thread [Next in Thread>