Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1411119pxb; Thu, 4 Nov 2021 01:39:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmv9T5EiFWgwIL5FErgGRjkrKPlgT2YTe9TJvkFSUcIcnBPGlgYhjMGTB8Hw77R7wfIuSN X-Received: by 2002:a05:6402:35c2:: with SMTP id z2mr4474237edc.135.1636015176775; Thu, 04 Nov 2021 01:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636015176; cv=none; d=google.com; s=arc-20160816; b=VbJYL9qe1hlK0PmvF1qNrV5csgmzs9xg1bTKi6BFE0JFVZzZBs60PDjUBgyO/xP06w Ut+xe4GtDLGHAbjyeiFrHmsMBcxv2sd3TIqh6kwRDLr1bDa16BFturv8GBRGdMkJMOFa uz2OCJMvkQH+JxI4vZkA0aD5v2ZGy/stQrY09i5rL+mjR621EaB9XeHt4JKviivZVmq2 IxFlhfZ2gpdsUpCLsVcVjb/004XYvhuCCtw/1JJvA5Nen9NZYjRz5LxpzdJN+Fc3zd73 2ekqRicCTmOcVj7qJKo7dvscqch2fNWPME5/mr5gjAbk7vxT3KzbhcJdHCOpqPG+358e cwrw== 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=jS89Xj+VfQ9PYZIaAjq6KTeAlryQwX9opaWuKLVVCac=; b=TLXES2g7k9y/Gqd5o8wkDSrfZmL9YLuKdAVgNIbcCKesNBL9PpefBvMruHExbHP51X OkTAIcbm3W87cQDj5sv03liq0nZxSYoWIMTIZ2bS6VnNgSpDfcxz3s0MqtpQPURoanHV It9jkcZk7DQCZMK4LuItHuXss9JNkxkIs65kEt/Y7c9CuxBxnQSKF8wFQeuutVR2pTzU YlHOvmclKClBCORKYiQx42wAsgYz6OXzYAcAC0/x0JfuqnBQEeilrsH/FHb9ycRW0Fxk pv2u2JbKhHrbNkT+Y7ToF0NyQu2S5sRxFqUrPsB9tYPOyJqojcPJWVJTAVizUxrzMOjo XRIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IqyxG9qe; 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 s20si6350450ejb.327.2021.11.04.01.39.12; Thu, 04 Nov 2021 01:39:36 -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=IqyxG9qe; 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 S230494AbhKDIji (ORCPT + 99 others); Thu, 4 Nov 2021 04:39:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbhKDIjh (ORCPT ); Thu, 4 Nov 2021 04:39:37 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BFD9C061714; Thu, 4 Nov 2021 01:37:00 -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=jS89Xj+VfQ9PYZIaAjq6KTeAlryQwX9opaWuKLVVCac=; b=IqyxG9qeLs4MByz0t7AcozirEk EYPdxz1sZhknq6KqfxeHqLeZLKUaAMkU1iiGBIGsby+JVZU5MFn8LG19RFBfo/owISGeaizOBENr0 Pc50seqUAt4jdr7UwKiJFqyxGxyALrVnUiDLv2DNbZS3C3GZe/sylxhVxeTPWYw1ldFeGxoP/2Cnh 3Ji5B4aqNTmk1Cs6yClxQ4D/3nX53JqFwfCdIevbq5YxOVg9Ck8OgpzNUvOyjHJ7QJWDOcdbBGdWk UNOi8nNIslv6Um16y8rr85cXqRpOcugjfENBy4+zc5n4GVWknCQgY7zTt0VeTjfGsz6mSi1yolDC3 6rep/UKQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1miYEp-008Jwb-Cd; Thu, 04 Nov 2021 08:36:47 +0000 Date: Thu, 4 Nov 2021 01:36:47 -0700 From: Christoph Hellwig To: Dan Williams Cc: Jane Chu , Christoph Hellwig , "Darrick J. Wong" , "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: <20211021001059.438843-1-jane.chu@oracle.com> <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 Wed, Nov 03, 2021 at 11:21:39PM -0700, Dan Williams wrote: > The concern I have with dax_clear_poison() is that it precludes atomic > error clearing. atomic as in clear poison and write the actual data? Yes, that would be useful, but it is not how the Intel pmem support actually works, right? > Also, as Boris and I discussed, poisoned pages should > be marked NP (not present) rather than UC (uncacheable) [1]. This would not really have an affect on the series, right? But yes, that seems like the right thing to do. > With > those 2 properties combined I think that wants a custom pmem fault > handler that knows how to carefully write to pmem pages with poison > present, rather than an additional explicit dax-operation. That also > meets Christoph's requirement of "works with the intended direct > memory map use case". So we have 3 kinds of accesses to DAX memory: (1) user space mmap direct access. (2) iov_iter based access (could be from kernel or userspace) (3) open coded kernel access using ->direct_access One thing I noticed: (2) could also work with kernel memory or pages, but that doesn't use MC safe access. Which seems like a major independent of this discussion. I suspect all kernel access could work fine with a copy_mc_to_kernel helper as long as everyone actually uses it, which will cover the missing required bits of (2) and (3) together with something like the ->clear_poison series from Jane. We just need to think hard what we want to do for userspace mmap access.