Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2009639pxb; Thu, 16 Sep 2021 23:16:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8MfMUxoSCAm3nAS2WbRR6t43smigHX5BX/a6BzB1vJeOjw4+/v8RRI1xkaSjsMm3jk4fV X-Received: by 2002:a05:6e02:c88:: with SMTP id b8mr6758176ile.300.1631859403084; Thu, 16 Sep 2021 23:16:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631859403; cv=none; d=google.com; s=arc-20160816; b=b4OZntuMfGbKdNP+L0Re1wnvqRNQdXSl7K+uEMRl5NYUND5LqhwivFep3lDtgKlNk2 /EexRxaLCf8Hq4rI3PUWPaBx949Ddzd/2O8y/u1pa16W3C0NQzqsGsGo4iTXXn9OORu9 cezJ9jCTzdeENSEVHNNHEexWQaHe5QTEIK3xxgO6AIzjKgp10cL2S645l2WHYUSyNuUu mcFfYzFjw+AByhIoOVoqJCRb4E3cUwP7xBegQidDRG053RbmT9WiknSQohPDLGmvVxiu 06eDV0w/0YV/3bVYoDVGZgavvWnQDx8W/8z0sB/N+K5LxbweiDRVf6Bb8wdpmmk9vmjA cEIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Wf67Cflfm8IYYsTzaYKBdKTyyIkowqSuJvIyiG8CUCY=; b=Y1tfinast6h78G93uDZ8TWXZJBMiVXf4nOIccsBNLSVKctx0a6qbj0Untmhq/Vn/OZ 16B+KlkkiR/E6z8exzs+8IactJ9X5vVKV6Z+vGEkLMy/O0N2t7GPT1zYr1NJkDXl6vRl F4x7NmOtcxm1ddUQVD3YRHb7p117BP8AgHvpU1HiOhkpDbJFxPok0JSxYKL74mKSKO34 eBZxGbFpHXVnlFRPy2wKs53FnO/Z6s7lEPpLTtBw5IrTrAuywEpaifmlLXyEy4Pj4WFK H7fR8jzeIDkJZWcffswBME1MxHWwhUAfxssXaXNmQrqlYsgBs7LR2KE12pPiotbUAMgy FOTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=LvlvtWTK; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si2569225iob.93.2021.09.16.23.16.31; Thu, 16 Sep 2021 23:16:43 -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=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=LvlvtWTK; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346335AbhIPTFY (ORCPT + 99 others); Thu, 16 Sep 2021 15:05:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344750AbhIPTFR (ORCPT ); Thu, 16 Sep 2021 15:05:17 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEE96C06639C for ; Thu, 16 Sep 2021 11:40:39 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id f129so7063576pgc.1 for ; Thu, 16 Sep 2021 11:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wf67Cflfm8IYYsTzaYKBdKTyyIkowqSuJvIyiG8CUCY=; b=LvlvtWTKlD9s/EDivdE4mILBwFWDacQU+lTor8a93tgHOXWU9Jp17vq0h3RX4ogJjN DVLh6goKK3t5EHBKcD6gMMpy7qnqsMS/0B6dWGUuyi4lJ0Z/Zgl4lhfSEARlWNyDkJk8 PTt3irJB9bwoir0gqUfmv7MClmERI2AdcVOEJYG8BrkHFLVEDTLbempK83vBXFiIFhXq P+E12qv6w7MDRccMJuObh/6EEkzrslmfLzfOtkIqPvTt5XDZJ8JVeY9yc6l4TZ0k1GwY HnuSiSoamLaphKntM41GgfAPVBlUnM1GwZZLJl9I/3psnuonX+9T+KuqE/5ruoj2w6f+ h4IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wf67Cflfm8IYYsTzaYKBdKTyyIkowqSuJvIyiG8CUCY=; b=G4VGracyLIoBcZIL6RazHZnPxiyQbimMYSOUdGf1cB1FPEbRcbD2cRTKnOqn08yQys 5MQy2aAgwGDFURgTzxvCz2RID9MWAvMqK+EH0xqfmOZqnimtps9hXuiI+XA6vJvSI5ov rjzTkorugC+iI/QLR5+Wd+8lZVxK7LbkgRoNQrNIKBkCs1TXd+aR+tNTFR3wN9rnMHIO jTzARvjWPOYF8vFRco+M7LpflqlIc6aTCkceboWRheZZECdsDTz4c/5tZfnlqClBdgid 4HRuHJVozg1El3yf4Hp91wRdNm4c6KWFqmxt44QVMyWWBG4bSGnb/6oyY+JlRGxWA5Sp t77A== X-Gm-Message-State: AOAM533VZahvn2jE8GQAewxk22UUYplfh3ZOadvkPs9QOg57LDKGOqXN 3c9kjQixBY6Mp7Ou48al7cfv82G2rcaIOGrhxiWfEA== X-Received: by 2002:a62:1b92:0:b0:3eb:3f92:724 with SMTP id b140-20020a621b92000000b003eb3f920724mr6491253pfb.3.1631817639221; Thu, 16 Sep 2021 11:40:39 -0700 (PDT) MIME-Version: 1.0 References: <20210914233132.3680546-1-jane.chu@oracle.com> <516ecedc-38b9-1ae3-a784-289a30e5f6df@oracle.com> <20210915161510.GA34830@magnolia> In-Reply-To: From: Dan Williams Date: Thu, 16 Sep 2021 11:40:28 -0700 Message-ID: Subject: Re: [PATCH 0/3] dax: clear poison on the fly along pwrite To: Christoph Hellwig Cc: "Darrick J. Wong" , Jane Chu , Vishal L Verma , Dave Jiang , "Weiny, Ira" , Al Viro , Matthew Wilcox , Jan Kara , Linux NVDIMM , Linux Kernel Mailing List , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 12:12 AM Christoph Hellwig wrote: > > On Wed, Sep 15, 2021 at 01:27:47PM -0700, Dan Williams wrote: > > > Yeah, Christoph suggested that we make the clearing operation explicit > > > in a related thread a few weeks ago: > > > https://lore.kernel.org/linux-fsdevel/YRtnlPERHfMZ23Tr@infradead.org/ > > > > That seemed to be tied to a proposal to plumb it all the way out to an > > explicit fallocate() mode, not make it a silent side effect of > > pwrite(). > > Yes. > > > > > > > Each of the dm drivers has to add their own ->clear_poison operation > > > that remaps the incoming (sector, len) parameters as appropriate for > > > that device and then calls the lower device's ->clear_poison with the > > > translated parameters. > > > > > > This (AFAICT) has already been done for dax_zero_page_range, so I sense > > > that Dan is trying to save you a bunch of code plumbing work by nudging > > > you towards doing s/dax_clear_poison/dax_zero_page_range/ to this series > > > and then you only need patches 2-3. > > > > Yes, but it sounds like Christoph was saying don't overload > > dax_zero_page_range(). I'd be ok splitting the difference and having a > > new fallocate clear poison mode map to dax_zero_page_range() > > internally. > > That was my gut feeling. If everyone feels 100% comfortable with > zeroingas the mechanism to clear poisoning I'll cave in. The most > important bit is that we do that through a dedicated DAX path instead > of abusing the block layer even more. ...or just rename dax_zero_page_range() to dax_reset_page_range()? Where reset == "zero + clear-poison"? > > > > BTW, our customer doesn't care about creating dax volume thru DM, so. > > > > > > They might not care, but anything going upstream should work in the > > > general case. > > > > Agree. > > I'm really worried about both patartitions on DAX and DM passing through > DAX because they deeply bind DAX to the block layer, which is just a bad > idea. I think we also need to sort that whole story out before removing > the EXPERIMENTAL tags. I do think it was a mistake to allow for DAX on partitions of a pmemX block-device. DAX-reflink support may be the opportunity to start deprecating that support. Only enable DAX-reflink for direct mounting on /dev/pmemX without partitions (later add dax-device direct mounting), change DAX-experimental warning to a deprecation notification for DAX on DM/partitions, continue to fail / never fix DAX-reflink for DM/partitions, direct people to use namespace provisioning for sub-divisions of PMEM capacity, and finally look into adding concatenation and additional software striping support to the new CXL region creation facility.