Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1504163pxp; Thu, 10 Mar 2022 06:46:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+mNDuetxHpVql633RFJ57V6OJXCccMyamzRi9dy+fNd2bbc9d/agHbCnEAPcODAUWmlKR X-Received: by 2002:a17:90b:1d12:b0:1bf:a3ce:597c with SMTP id on18-20020a17090b1d1200b001bfa3ce597cmr5464959pjb.110.1646923614784; Thu, 10 Mar 2022 06:46:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646923614; cv=none; d=google.com; s=arc-20160816; b=Wzzhx8sgrY0GRJ5chy4c1nQsv8LvkVG9mQqO6a0O8SB3BSz+rHw2Rloho4VDJnSBE3 x1eOyQVChdbL3b7nuviIpLd5Z8VF2byRM12vIdB4BFn2M1FRddZMUfw1WsxhP5U3gOGR 3Z1IAk+ahd1AH5cMRCBC7oU0BK6NunpT6zgo0UMNyeX5sL/tKt2PlDD9H6wRkyKpbZZN r1f78mIUP568s09VA2yAMCA24GARm5hnsmELe4zq5AmT9HfhuUGClrvXoZQ8yrtwdFPI mUlEu5bV9rzQtycbdpfl4IONday2Cdw7dVSFdz3PCST6WfoIFXJ3uIBlgTlybvbG/Avx Xoaw== 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=RzBwZmXuL2mtDGId2fRGQ9cdH48yHESLY1EUls+Y0mA=; b=btUnHDPYjB2m/ux8W3w+e5PFMfxhhH0SjHsPHKFN5a2W11gcZYonE3919IEmq6xPVT MPjsYa1xCf/04anYohqMtERHwpVqKkixC/sx7mNK0DcaDTmtZ+gzlORdNfWHux54/1Tv 5aK1AymAjz/ZszIILZ+6dlXRekQWvjBT74nRisl1MmGZrLK0rRZCDyF6RodYF7lHJp9e NRndKDucj1RAWcwO0r8mFlms3523e05zH2O2YHBRKN78zK8/Gyw8TtKc0XZgIv/XSz9b LM8g1g1GES3Vmpcw/u8RZN8fp4Xk8G/tkX+Bdb7gwCgia4lnjYC+gAVSr3TY/LW5z+72 dMLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=3fblK4Lx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id br10-20020a17090b0f0a00b001bd14e01f4esi5008377pjb.60.2022.03.10.06.46.37; Thu, 10 Mar 2022 06:46:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=3fblK4Lx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236178AbiCJAlh (ORCPT + 99 others); Wed, 9 Mar 2022 19:41:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233452AbiCJAlg (ORCPT ); Wed, 9 Mar 2022 19:41:36 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCCFD12550E for ; Wed, 9 Mar 2022 16:40:36 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id n15so3450133plh.2 for ; Wed, 09 Mar 2022 16:40:36 -0800 (PST) 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=RzBwZmXuL2mtDGId2fRGQ9cdH48yHESLY1EUls+Y0mA=; b=3fblK4Lx9eyAfaGQJ50OJygXLr3+yngV/09AYMG9DMOQXco1UvGBl0AA0tGjTcpBuL qHt6ZCzQlf8sISB0V93pZihkUafr9czsnHqjVeIJB64e7Odk4gEDbBLGV7HMcnb4CNqe 2ZNlLK9eCP8cYoVJIeqOzgqErWYFpZzaGGpTl6YSYDkjL3SmiSahCh+xtHEDjO0njdJK 1yi1kqR3uM1lGNvzVBUU6G3FKCEUFo9CWrmmN/lwTOnG6fRdAzpVscQ6LsXIDFtDZ9nk 89nyYEbe1yTf8OUZXOg10LSsxznBJiSXMT/KFTyNyCSDq5UlCiSA4eUHry3XcY/oaIw4 Fcdw== 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=RzBwZmXuL2mtDGId2fRGQ9cdH48yHESLY1EUls+Y0mA=; b=gsu8ju8FcbrJY4SxyXO63TWNl3JjjjiQTkL8VJrN2xQxEikr2eKjDDmJHSTB/8VtHw r3Ct2tS6IBmFPtrjfECJiJ7gtas5Ri/43hUNaBlqTe6qgbqRP3ujDKEiO88Jh+g2ao6a GXFWoXMIb0rBfnyB8FNN4wJ8mZIsLqiz/hvu0Opo5xE5O/a1f8Y6c41XutRCp1zh0Zrs ceirq+4z3sRPhkzB4VnuGiddfwIENCKfWa3JER4p7+2GGPykIJUzRcvoshVdBBIvRFyp DfMCGGN4DLDuPRiMNl0QhCXz+7Q1hYTOiL+vhmyhEglfC1L/LayFdhr7yCQIoyoIInSh 2DNg== X-Gm-Message-State: AOAM530RY+2d3OGIpLYeAzScpkc/yFD30DaBECrAnUx4lQId1NjGo/wE Wt0rCIT6Lio+gXj5AOqtvb7ikN98brHwnI7ggUTTtw== X-Received: by 2002:a17:90a:990c:b0:1bc:3c9f:2abe with SMTP id b12-20020a17090a990c00b001bc3c9f2abemr2235610pjp.220.1646872836330; Wed, 09 Mar 2022 16:40:36 -0800 (PST) MIME-Version: 1.0 References: <20220302082718.32268-1-songmuchun@bytedance.com> <20220302082718.32268-4-songmuchun@bytedance.com> In-Reply-To: From: Dan Williams Date: Wed, 9 Mar 2022 16:40:25 -0800 Message-ID: Subject: Re: [PATCH v4 3/6] mm: rmap: introduce pfn_mkclean_range() to cleans PTEs To: Muchun Song Cc: Matthew Wilcox , Jan Kara , Al Viro , Andrew Morton , Alistair Popple , Yang Shi , Ralph Campbell , Hugh Dickins , xiyuyang19@fudan.edu.cn, "Kirill A. Shutemov" , Ross Zwisler , Christoph Hellwig , linux-fsdevel , Linux NVDIMM , Linux Kernel Mailing List , Linux MM , duanxiongchun@bytedance.com, Muchun Song Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 9, 2022 at 4:26 PM Dan Williams wrote: > > On Wed, Mar 2, 2022 at 12:29 AM Muchun Song wrote: > > > > The page_mkclean_one() is supposed to be used with the pfn that has a > > associated struct page, but not all the pfns (e.g. DAX) have a struct > > page. Introduce a new function pfn_mkclean_range() to cleans the PTEs > > (including PMDs) mapped with range of pfns which has no struct page > > associated with them. This helper will be used by DAX device in the > > next patch to make pfns clean. > > This seems unfortunate given the desire to kill off > CONFIG_FS_DAX_LIMITED which is the only way to get DAX without 'struct > page'. > > I would special case these helpers behind CONFIG_FS_DAX_LIMITED such > that they can be deleted when that support is finally removed. ...unless this support is to be used for other PFN_MAP scenarios where a 'struct page' is not available? If so then the "(e.g. DAX)" should be clarified to those other cases.