Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1921499pxb; Thu, 4 Nov 2021 10:46:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwle9XTgat1EVtiOxx1MTKlIewc4FHDhfEwrxX6LBcKEFWxCL5Bt9TZUq2+VA9x6ZsGontl X-Received: by 2002:a17:906:c301:: with SMTP id s1mr65419365ejz.409.1636047989749; Thu, 04 Nov 2021 10:46:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636047989; cv=none; d=google.com; s=arc-20160816; b=UWFNKvDGDD4RvDsfDv30QLk4ZlWT0VSZ/+ZfVBYq8AIzsvIECHiR0OIP3wFHDiXLaR 1JxhcI8pcd8ECh373ILlSlY9xuLHwU3TT+etHsuZOUmdhi/g0Vxod6r4JIZIRGqNI4yH feSr9P8sSRRH3fNdZn47FIFMCMgGQdesJw7oKVMDlsC/WCOiVlZJL1S5dFDH/acLw1yk S49yx9NMl+SSeQSn6W6+Vo3i5Wnk+9e4JXqhwyQqEMq7DJmzePAa1HyJdqxY0mtUFTow deYFfIYlC92/OybZDx0672W3zSKzASMwYmkLg+TlXrSfQNoN3tBLsYbLBc1RN06Dsdr+ HBgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tpfTM33t7i1Dy0/MirwuyrZHtl/M5zJb53zksLaIaww=; b=MKdgQwJQ8FRMAiPmy0XM/GC9A4OSlbJo+x2OWhzF0W0mDNFXLDEoZ9DblFdWQt4qTm YDnkKlTFCS7h+U35vYOPSgy3ZVZ4/7ltmFHyN8ZxGD4hyo6JC1r4ipLDwlgCthVO+Kqr Ger1boQyo/JaLgK/vV2QxoWa7snw2jDsdxdMnuBpsz5BgbRqCKNRh6OPuadYcsrnccAa 3IfHoriajTDfOPtdYVIH7opEPROHJp4T3LOe4ODc4kWEc45U9ExV7S9z7DED2Jp3xGxf T4DXScg8bb/jR6QGx3tpaGreSdrIYJBI68KAq5CUGLllHOE674eZfLb3GZblvc7J+aG8 21+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=izhOhuQ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si8128931edd.600.2021.11.04.10.45.47; Thu, 04 Nov 2021 10:46:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=izhOhuQ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231526AbhKDRqQ (ORCPT + 99 others); Thu, 4 Nov 2021 13:46:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232255AbhKDRqQ (ORCPT ); Thu, 4 Nov 2021 13:46:16 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CEC5C061203; Thu, 4 Nov 2021 10:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tpfTM33t7i1Dy0/MirwuyrZHtl/M5zJb53zksLaIaww=; b=izhOhuQ7+o/FPLVHvFRYe7dOmO EKtpQ0CBDnMKmuXKOe/Zlh3NIONEezpxzTNpDKYTwr2pABanbXIUtTny/VMaNObE/41bPRgqEE1uC cJRKfVaWHcbVX0BuZoBaOgRR/QHe11HLcQ1i7+xflfuFOu2PIxtSyoHEzWKTqfAypcc0omMUWaqIi wkJHvA25mPsBegAiAH8kwFuGnFD2JvXc+tPH335MDjyWcR+/l22fT7b3i51K+5SAj73ghFlbVcP7g vB5RMzB4fuLnjRRi8+4CN9cEcAaZrhSCOTkqBD6gjg+TXUwTbfhTswKMHe6JQ4Skm4Kb2uT9qmp78 l/43M2oQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1migln-009hiW-DT; Thu, 04 Nov 2021 17:43:23 +0000 Date: Thu, 4 Nov 2021 10:43:23 -0700 From: Christoph Hellwig To: Dan Williams Cc: Christoph Hellwig , "Darrick J. Wong" , Jane Chu , "david@fromorbit.com" , "vishal.l.verma@intel.com" , "dave.jiang@intel.com" , "agk@redhat.com" , "snitzer@redhat.com" , "dm-devel@redhat.com" , "ira.weiny@intel.com" , "willy@infradead.org" , "vgoyal@redhat.com" , "linux-fsdevel@vger.kernel.org" , "nvdimm@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "linux-xfs@vger.kernel.org" Subject: Re: [dm-devel] [PATCH 0/6] dax poison recovery with RWF_RECOVERY_DATA flag Message-ID: References: <2102a2e6-c543-2557-28a2-8b0bdc470855@oracle.com> <20211028002451.GB2237511@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 04, 2021 at 09:24:15AM -0700, Dan Williams wrote: > No, the big difference with every other modern storage device is > access to byte-addressable storage. Storage devices get to "cheat" > with guaranteed minimum 512-byte accesses. So you can arrange for > writes to always be large enough to scrub the ECC bits along with the > data. For PMEM and byte-granularity DAX accesses the "sector size" is > a cacheline and it needed a new CPU instruction before software could > atomically update data + ECC. Otherwise, with sub-cacheline accesses, > a RMW cycle can't always be avoided. Such a cycle pulls poison from > the device on the read and pushes it back out to the media on the > cacheline writeback. Indeed. The fake byte addressability is indeed the problem, and the fix is to not do that, at least on the second attempt. > I don't understand what overprovisioning has to do with better error > management? No other storage device has seen fit to be as transparent > with communicating the error list and offering ways to proactively > scrub it. Dave and Darrick rightly saw this and said "hey, the FS > could do a much better job for the user if it knew about this error > list". So I don't get what this argument about spare blocks has to do > with what XFS wants? I.e. an rmap facility to communicate files that > have been clobbered by cosmic rays and other calamities. Well, the answer for other interfaces (at least at the gold plated cost option) is so strong internal CRCs that user visible bits clobbered by cosmic rays don't realisticly happen. But it is a problem with the cheaper ones, and at least SCSI and NVMe offer the error list through the Get LBA status command (and I bet ATA too, but I haven't looked into that). Oddly enough there has never been much interested from the fs community for those. > > So far out of the low instrusiveness options Janes' previous series > > to automatically retry after calling a clear_poison operation seems > > like the best idea so far. We just need to also think about what > > we want to do for direct users of ->direct_access that do not use > > the mcsafe iov_iter helpers. > > Those exist? Even dm-writecache uses copy_mc_to_kernel(). I'm sorry, I have completely missed that it has been added. And it's been in for a whole year..