Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp966968pxb; Thu, 23 Sep 2021 14:44:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqiPJcm9dK+vI3gDaDurLgxbIIqYbtEPxSl/fTQTiaiUiqmzhDP7fuEZ6mY04ZmhMLe1qF X-Received: by 2002:a17:907:1de0:: with SMTP id og32mr7682779ejc.348.1632433464656; Thu, 23 Sep 2021 14:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632433464; cv=none; d=google.com; s=arc-20160816; b=OZPNG5jvGO6LVpkeTaiCF1cz/wP0HMxwccyw9qFjxbpOpfqd9eIJL6lzLanQcrhVui O9n8Unk8x7GQ3iRVIA924+P/0o//WKYwY2BBKQng/czg/43vYTNvDXGSFEdEBp7R6nZH 2rKrPhrdPLNDnU0ehNjgvum7ceDPS+mduevm902Uxi0UiiDcLTZeoeec9bBY0BksEFF8 avOd5h5aaKXkIlwEP7ZZxLvYCJQt9EHuyXEubA+eQsHMCYKIFkjvNKB7UnTkpuIy87Lh dojMpt2xxzrZEtxhgdbfkRslrtRRAZLSv1N1tfA00dDtr9C3eqhMPKmHVJaHKe7fEuxR 8Ukg== 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=eyYDxmDuTKY2lFXVhVB2ELOLfNUN9k8MQqqdBbe1fsU=; b=nTU3JzUphria0sem4lwQgsEONFo3J4YmG5BMMAbmQR49sb5Xbfmbm4KD1aZxgwGjxF q8++K4ZZXv+JEkIFQPLGDRpGbm64B17eVblyyJSXg+YCLiU2Qi3X8ITA80DUdEz6uGxA 5Ypacj9+DmQDs5Qjxa53WH+fi2OgsO8ucBfZxWyX7VjNylLj9giJbL/zwDa1pjVWJOKY e+IAltm4FHbQzLbtAJTJ8ykV5FaCVAJCRpQMEfLMnrBKlSfx08va6vpNlQlGs4ATITOm iGrpaMx6iziedOvYNwKn3yv7R/lrmsW32YRdlBqSrwf17m5PrVPh6qEXNbKaYAa2uMq9 HHOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=KCn+RIus; 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 i7si7312622eds.165.2021.09.23.14.44.00; Thu, 23 Sep 2021 14:44:24 -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=KCn+RIus; 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 S243365AbhIWVnz (ORCPT + 99 others); Thu, 23 Sep 2021 17:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243303AbhIWVny (ORCPT ); Thu, 23 Sep 2021 17:43:54 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D90C061574 for ; Thu, 23 Sep 2021 14:42:22 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id f129so7726506pgc.1 for ; Thu, 23 Sep 2021 14:42:22 -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=eyYDxmDuTKY2lFXVhVB2ELOLfNUN9k8MQqqdBbe1fsU=; b=KCn+RIus6IoAP1X8IGB5+QqORKUYHiZhLK/h15vdz7nwgfVVFdnDeTUS6x5EfXNqEL vHkl1lsNcWgI2Al+3tUFeWxzv41dExhFvYTSHffU7w2mJqYg/X4iTVmV0gzEv6VATSbN GyrOI1pXzxSYSJQ2Su61Cky0Czb2vOefxnUSphokfU44py09/SjUTaxnIYLh7Be5ditG 13BEmHxxYJ41ceEGMeAmeMf8/NrNBgazCyMlEf22xgNKPlhHw9XSI4GKbwvwi0qv0ovI KwZVg7eF6TaIoezX825StnyoRzKkWaAdbc7zT1oe51mmpWNq0/cltBhb4i62RbDpm+SV N0pA== 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=eyYDxmDuTKY2lFXVhVB2ELOLfNUN9k8MQqqdBbe1fsU=; b=OTvQndz1TciwDtqcPd02Nam23yeNmDBOdoY6I7bttUsP2QjscDbTBXQdP28YvhimaM VD0a94nHp9Tj3qKPpTHDAaAWHDWd2woCIMtf2+115sFu0dqQiecpCVDJkBINa6aXy/Ak GeRhaHwLit0PC2NUG8HAZ9IxzODVBx+UjoVCc3yu3YGScsXXDaipQjw2RxOxxBEW7als jlereVhXTYH/9syqxhJZVzYMpqqbK+9LEj8P4QSuFfZO1FRWyYOrFhLIVUmKN5A3DzeM Y1CXcQ4Um+ZwIzUAPeQMYYOJD2hJDDgcWGeroJdTcOwIKReVZkYcm8aCvmJcqUxlQcxM pCfA== X-Gm-Message-State: AOAM5312JW21IRaYMhAmIc/UM8eSMyTwXe4UH2iBcV04+AbXnW5WGftA JNgHGK8I6s8+6yjSvtGuKouBiGjp1dfyp+FLZnuwhg== X-Received: by 2002:a62:7f87:0:b0:444:b077:51ef with SMTP id a129-20020a627f87000000b00444b07751efmr6537475pfd.61.1632433342168; Thu, 23 Sep 2021 14:42:22 -0700 (PDT) MIME-Version: 1.0 References: <20210914233132.3680546-1-jane.chu@oracle.com> <516ecedc-38b9-1ae3-a784-289a30e5f6df@oracle.com> <20210915161510.GA34830@magnolia> <324444b0-6121-d14c-a59f-7689bb206f58@oracle.com> In-Reply-To: <324444b0-6121-d14c-a59f-7689bb206f58@oracle.com> From: Dan Williams Date: Thu, 23 Sep 2021 14:42:10 -0700 Message-ID: Subject: Re: [PATCH 0/3] dax: clear poison on the fly along pwrite To: Jane Chu Cc: "Darrick J. Wong" , 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 23, 2021 at 1:56 PM Jane Chu wrote: [..] > > 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. > > Thanks Darrick for the explanation! > I don't mind to add DM layer support, it sounds straight forward. > I also like your latest patch and am wondering if the clear_poison API > is still of value. No, the discussion about fallocate(...ZEROINIT...) has lead to a better solution. Instead of making error clearing a silent / opportunistic side-effect of writes, or trying to define new fallocate mode, just add a new RWF_CLEAR_HWERROR flag to pwritev2(). This allows for dax_direct_access() to map the page regardless of poison and trigger pmem_copy_from_iter() to precisely handle sub-page poison.