From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io Date: Fri, 15 Apr 2016 13:01:49 -0600 Message-ID: <1460746909.4597.7.camel@hpe.com> References: <1459303190-20072-1-git-send-email-vishal.l.verma@intel.com> <1459303190-20072-6-git-send-email-vishal.l.verma@intel.com> <1460739288.3012.3.camel@intel.com> <1460741821.3012.11.camel@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: "axboe@fb.com" , "jack@suse.cz" , "david@fromorbit.com" , "linux-kernel@vger.kernel.org" , "xfs@oss.sgi.com" , "hch@infradead.org" , "linux-mm@kvack.org" , "linux-block@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "linux-nvdimm@ml01.01.org" , "linux-fsdevel@vger.kernel.org" , "akpm@linux-foundation.org" , "linux-ext4@vger.kernel.org" , "Wilcox, Matthew R" To: Dan Williams , Jeff Moyer Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org List-Id: linux-ext4.vger.kernel.org On Fri, 2016-04-15 at 11:17 -0700, Dan Williams wrote: > On Fri, Apr 15, 2016 at 11:06 AM, Jeff Moyer wrote: > >=20 > > Dan Williams writes: > >=C2=A0 > > > > > There's a lot of special casing here, so you might consider > > > > > adding comments. > > > > Correct - maybe we should reconsider wrapper-izing this? :) > > > Another option is just to skip dax_do_io() and this special casing > > > fallback entirely if errors are present.=C2=A0=C2=A0I.e. only attem= pt dax_do_io > > > when: IS_DAX() && gendisk->bb && bb->count =3D=3D 0. > > > > So, if there's an error anywhere on the device, penalize all I/O (not > > just writes, and not just on sectors that are bad)?=C2=A0=C2=A0I'm no= t sure > > that's a great plan, either. > >=20 > If errors are rare how much are we actually losing in practice? > Moreover, we're going to do the full badblocks lookup anyway when we > call ->direct_access().=C2=A0=C2=A0If we had that information earlier w= e can > avoid this fallback dance. A system running with DAX may have active data set in NVDIMM lager than R= AM size. =C2=A0In this case, falling back to non-DAX will allocate page cach= e for the data, which will saturate the system with memory pressure. Thanks, -Toshi =C2=A0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id 5D6C57CA0 for ; Fri, 15 Apr 2016 14:10:30 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay3.corp.sgi.com (Postfix) with ESMTP id CFD12AC001 for ; Fri, 15 Apr 2016 12:10:26 -0700 (PDT) Received: from g4t3426.houston.hp.com (g4t3426.houston.hp.com [15.201.208.54]) by cuda.sgi.com with ESMTP id fDlGNO9CnCsFER0P (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 15 Apr 2016 12:10:24 -0700 (PDT) Message-ID: <1460746909.4597.7.camel@hpe.com> Subject: Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io From: Toshi Kani Date: Fri, 15 Apr 2016 13:01:49 -0600 In-Reply-To: References: <1459303190-20072-1-git-send-email-vishal.l.verma@intel.com> <1459303190-20072-6-git-send-email-vishal.l.verma@intel.com> <1460739288.3012.3.camel@intel.com> <1460741821.3012.11.camel@intel.com> Mime-Version: 1.0 List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Dan Williams , Jeff Moyer Cc: "hch@infradead.org" , "jack@suse.cz" , "linux-nvdimm@ml01.01.org" , "linux-kernel@vger.kernel.org" , "xfs@oss.sgi.com" , "axboe@fb.com" , "linux-mm@kvack.org" , "linux-block@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "linux-fs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SWYgZXJyb3JzIGFyZSByYXJlIGhvdyBtdWNoIGFyZSB3ZSBhY3R1YWxseSBs b3NpbmcgaW4gcHJhY3RpY2U/Cj4gTW9yZW92ZXIsIHdlJ3JlIGdvaW5nIHRvIGRvIHRoZSBmdWxs IGJhZGJsb2NrcyBsb29rdXAgYW55d2F5IHdoZW4gd2UKPiBjYWxsIC0+ZGlyZWN0X2FjY2Vzcygp LsKgwqBJZiB3ZSBoYWQgdGhhdCBpbmZvcm1hdGlvbiBlYXJsaWVyIHdlIGNhbgo+IGF2b2lkIHRo aXMgZmFsbGJhY2sgZGFuY2UuCgpBIHN5c3RlbSBydW5uaW5nIHdpdGggREFYIG1heSBoYXZlIGFj dGl2ZSBkYXRhIHNldCBpbiBOVkRJTU0gbGFnZXIgdGhhbiBSQU0Kc2l6ZS4gwqBJbiB0aGlzIGNh c2UsIGZhbGxpbmcgYmFjayB0byBub24tREFYIHdpbGwgYWxsb2NhdGUgcGFnZSBjYWNoZSBmb3IK dGhlIGRhdGEsIHdoaWNoIHdpbGwgc2F0dXJhdGUgdGhlIHN5c3RlbSB3aXRoIG1lbW9yeSBwcmVz c3VyZS4KClRoYW5rcywKLVRvc2hpIMKgCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fXwp4ZnMgbWFpbGluZyBsaXN0Cnhmc0Bvc3Muc2dpLmNvbQpodHRwOi8v b3NzLnNnaS5jb20vbWFpbG1hbi9saXN0aW5mby94ZnMK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by kanga.kvack.org (Postfix) with ESMTP id AA2D56B0005 for ; Fri, 15 Apr 2016 15:10:24 -0400 (EDT) Received: by mail-ob0-f197.google.com with SMTP id th5so42948472obc.1 for ; Fri, 15 Apr 2016 12:10:24 -0700 (PDT) Received: from g4t3426.houston.hp.com (g4t3426.houston.hp.com. [15.201.208.54]) by mx.google.com with ESMTPS id jx3si17038386oeb.82.2016.04.15.12.10.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Apr 2016 12:10:24 -0700 (PDT) Message-ID: <1460746909.4597.7.camel@hpe.com> Subject: Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io From: Toshi Kani Date: Fri, 15 Apr 2016 13:01:49 -0600 In-Reply-To: References: <1459303190-20072-1-git-send-email-vishal.l.verma@intel.com> <1459303190-20072-6-git-send-email-vishal.l.verma@intel.com> <1460739288.3012.3.camel@intel.com> <1460741821.3012.11.camel@intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: Dan Williams , Jeff Moyer Cc: "axboe@fb.com" , "jack@suse.cz" , "david@fromorbit.com" , "linux-kernel@vger.kernel.org" , "xfs@oss.sgi.com" , "hch@infradead.org" , "linux-mm@kvack.org" , "linux-block@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "linux-nvdimm@ml01.01.org" , "linux-fsdevel@vger.kernel.org" , "akpm@linux-foundation.org" , "linux-ext4@vger.kernel.org" , "Wilcox, Matthew R" On Fri, 2016-04-15 at 11:17 -0700, Dan Williams wrote: > On Fri, Apr 15, 2016 at 11:06 AM, Jeff Moyer wrote: > > > > Dan Williams writes: > >A > > > > > There's a lot of special casing here, so you might consider > > > > > adding comments. > > > > Correct - maybe we should reconsider wrapper-izing this? :) > > > Another option is just to skip dax_do_io() and this special casing > > > fallback entirely if errors are present.A A I.e. only attempt dax_do_io > > > when: IS_DAX() && gendisk->bb && bb->count == 0. > > > > So, if there's an error anywhere on the device, penalize all I/O (not > > just writes, and not just on sectors that are bad)?A A I'm not sure > > that's a great plan, either. > > > If errors are rare how much are we actually losing in practice? > Moreover, we're going to do the full badblocks lookup anyway when we > call ->direct_access().A A If we had that information earlier we can > avoid this fallback dance. A system running with DAX may have active data set in NVDIMM lager than RAM size. A In this case, falling back to non-DAX will allocate page cache for the data, which will saturate the system with memory pressure. Thanks, -Toshi A -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbcDOTK1 (ORCPT ); Fri, 15 Apr 2016 15:10:27 -0400 Received: from g4t3426.houston.hp.com ([15.201.208.54]:40859 "EHLO g4t3426.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751745AbcDOTKZ (ORCPT ); Fri, 15 Apr 2016 15:10:25 -0400 Message-ID: <1460746909.4597.7.camel@hpe.com> Subject: Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io From: Toshi Kani To: Dan Williams , Jeff Moyer Cc: "axboe@fb.com" , "jack@suse.cz" , "david@fromorbit.com" , "linux-kernel@vger.kernel.org" , "xfs@oss.sgi.com" , "hch@infradead.org" , "linux-mm@kvack.org" , "linux-block@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "linux-nvdimm@ml01.01.org" , "linux-fsdevel@vger.kernel.org" , "akpm@linux-foundation.org" , "linux-ext4@vger.kernel.org" , "Wilcox, Matthew R" Date: Fri, 15 Apr 2016 13:01:49 -0600 In-Reply-To: References: <1459303190-20072-1-git-send-email-vishal.l.verma@intel.com> <1459303190-20072-6-git-send-email-vishal.l.verma@intel.com> <1460739288.3012.3.camel@intel.com> <1460741821.3012.11.camel@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2 (3.18.5.2-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2016-04-15 at 11:17 -0700, Dan Williams wrote: > On Fri, Apr 15, 2016 at 11:06 AM, Jeff Moyer wrote: > > > > Dan Williams writes: > >  > > > > > There's a lot of special casing here, so you might consider > > > > > adding comments. > > > > Correct - maybe we should reconsider wrapper-izing this? :) > > > Another option is just to skip dax_do_io() and this special casing > > > fallback entirely if errors are present.  I.e. only attempt dax_do_io > > > when: IS_DAX() && gendisk->bb && bb->count == 0. > > > > So, if there's an error anywhere on the device, penalize all I/O (not > > just writes, and not just on sectors that are bad)?  I'm not sure > > that's a great plan, either. > > > If errors are rare how much are we actually losing in practice? > Moreover, we're going to do the full badblocks lookup anyway when we > call ->direct_access().  If we had that information earlier we can > avoid this fallback dance. A system running with DAX may have active data set in NVDIMM lager than RAM size.  In this case, falling back to non-DAX will allocate page cache for the data, which will saturate the system with memory pressure. Thanks, -Toshi