Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1486225pxb; Wed, 30 Mar 2022 04:50:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw52R95L3tUs++iAzFbnpuYR/UIWwqC3FWCSgbKF3peU5cLz8q1Hqi2BbrhHqkuvQAkjeZR X-Received: by 2002:a17:90a:5301:b0:1c9:e363:4d9 with SMTP id x1-20020a17090a530100b001c9e36304d9mr4551845pjh.244.1648641027295; Wed, 30 Mar 2022 04:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648641027; cv=none; d=google.com; s=arc-20160816; b=PIikGfMbWdLDUxfaXTDjNDlolHkZJBNfLyBsLsPS7VqlNc7EFXSwSKRmMs/e8vUfi3 YTvp7Za5azf5twgk7DKOjjrxpGTtK93sVCeiJWYNVAe8w4/sGbiw6JCF0N3p4dmlyCZv oUslMWZXIwoqUMBhyHBy0WxE+XLiWxsbLI5gg2/6D4trLe/sVkpBgEAAYdNUhtqwD+G4 FplvRRlRnC86XJ1zif4oMvcYJkGN/75uwVgFiGLXQLRuovdL0R6DXGZlEvqBETscwFUS ZgsE5Tlv6/ycb72HPvPkrMxQoF6NZ0LR1qdPopvmLLhd/YQKY7YhsSL3iCMQX0DOwJNg vRfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DdqwlImXrfao84vCHBrZYdsfDtapi0otjvjw/TD7gAs=; b=pZVBoqOgh73TEuAvedZpANnNLRm0H00/5nHXosq+KDGem4QAKtomcclkr3mCzr3udl s5QfWMv/bjL22Ke/Qkh776Q6VTnMe17ke+1Y0jot3gdzCT6Cgs4xaqlLsMhGnCEQ/elg 5mQWNfugBWr5o/M0xZUjcPEtq+dIC7ZwIv5mxdrV/xRpImXjpM94Zysu3D6jA8rKiobG CetkV20y4dWnwIFlO+RzlKhLZfk5cPnVqGb+bxrZ4zAFkRo9/JaDojb2HFQA11RoGoS9 96kcRlCKizQr7Npq3LeZSB0RAhwEqt1HAjRSqxNqrdobVopyubIheCdCYzXa5BhTUjli o/IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=iqmBctwa; 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=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p5-20020a634205000000b003816043ef98si20402381pga.397.2022.03.30.04.50.11; Wed, 30 Mar 2022 04:50:27 -0700 (PDT) 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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=iqmBctwa; 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=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234982AbiC2NvU (ORCPT + 99 others); Tue, 29 Mar 2022 09:51:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234087AbiC2NvS (ORCPT ); Tue, 29 Mar 2022 09:51:18 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 819F969281 for ; Tue, 29 Mar 2022 06:49:35 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id g9-20020a17090ace8900b001c7cce3c0aeso2028734pju.2 for ; Tue, 29 Mar 2022 06:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DdqwlImXrfao84vCHBrZYdsfDtapi0otjvjw/TD7gAs=; b=iqmBctwaR3RnMvlGbfAY9TefMgdpgPs5uTFnScOMAg7WCye0WWGUkpPFAhBNOx6r7X 7xbZLOsB1kf93MKkXiauUeHte6cMJQCWg8asM67oms0HaCmzDyQIXBOb84j+6oJthZNW NGw3IQOqZD0a3q/6QqOXLCTkJC5iXA/i1gb4icEhNapcEGT4XYNP3m4EWTCdI4dHz2Vk wyxu0v8qqP24AnkXN9DxEJdRfba89K846CIvOrB94f/L5wC4PKYmrr+1/BcyhjNlHdlT 7YOMNiaENUWkeJEkji8G+ikHaeuCX17BWmjKWjOjM4F5ReBHm5idgE8oiFkBuBnH1aXZ yk0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DdqwlImXrfao84vCHBrZYdsfDtapi0otjvjw/TD7gAs=; b=dYSzWq1dfVzhfd4tpv2v0TtfzHO5ScU/rY//dTnFnST6Ufza4C7CMoqPb58hHHDJX8 ZYsmMxRtXVIHEMuRM/Tl1V3D43Cg6W8uGhHBdn2tDst2L0fVw48MVFcnl8NiM31KVQYN 5tjw5xuBUCRa19DudAJLkeuo4RMF72uLIzk9w58F8Jxgh4lo4k8DRFnTPzrMqc4X+KVQ cU24YpE54zC6VYboiVghkPNe2a1Smh9MolGIK8kJQTGQGwbpUnT8Jtt/3pehKEmm9jok AeDO9TLhXcibEqkW4t3STs240q8+8Otjfa36B+MjLvNK3HL1w/9jc3GT71/stZ12nSaN EOUg== X-Gm-Message-State: AOAM533PHhER8iZIdyd8FH3SZfyYnrX0NivemnrkqKtP708fqTkB5T8T siTMzQvKzBTy2Xcy5UDiFS7uYA== X-Received: by 2002:a17:902:e5cc:b0:154:1c96:2e5b with SMTP id u12-20020a170902e5cc00b001541c962e5bmr30655333plf.94.1648561774945; Tue, 29 Mar 2022 06:49:34 -0700 (PDT) Received: from FVFYT0MHHV2J.bytedance.net ([139.177.225.239]) by smtp.gmail.com with ESMTPSA id o14-20020a056a0015ce00b004fab49cd65csm20911293pfu.205.2022.03.29.06.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 06:49:34 -0700 (PDT) From: Muchun Song To: dan.j.williams@intel.com, willy@infradead.org, jack@suse.cz, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, apopple@nvidia.com, shy828301@gmail.com, rcampbell@nvidia.com, hughd@google.com, xiyuyang19@fudan.edu.cn, kirill.shutemov@linux.intel.com, zwisler@kernel.org, hch@infradead.org Cc: linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com, smuchun@gmail.com, Muchun Song Subject: [PATCH v6 0/6] Fix some bugs related to ramp and dax Date: Tue, 29 Mar 2022 21:48:47 +0800 Message-Id: <20220329134853.68403-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.0 (Apple Git-132) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=unavailable 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 This series is based on next-20220225. Patch 1-2 fix a cache flush bug, because subsequent patches depend on those on those changes, there are placed in this series. Patch 3-4 are preparation for fixing a dax bug in patch 5. Patch 6 is code cleanup since the previous patch remove the usage of follow_invalidate_pte(). v6: - Collect Reviewed-by from Christoph Hellwig. - Fold dax_entry_mkclean() into dax_writeback_one(). v5: - Collect Reviewed-by from Dan Williams. - Fix panic reported by kernel test robot . - Remove pmdpp parameter from follow_invalidate_pte() and fold it into follow_pte(). v4: - Fix compilation error on riscv. v3: - Based on next-20220225. v2: - Avoid the overly long line in lots of places suggested by Christoph. - Fix a compiler warning reported by kernel test robot since pmd_pfn() is not defined when !CONFIG_TRANSPARENT_HUGEPAGE on powerpc architecture. - Split a new patch 4 for preparation of fixing the dax bug. Muchun Song (6): mm: rmap: fix cache flush on THP pages dax: fix cache flush on PMD-mapped pages mm: rmap: introduce pfn_mkclean_range() to cleans PTEs mm: pvmw: add support for walking devmap pages dax: fix missing writeprotect the pte entry mm: simplify follow_invalidate_pte() fs/dax.c | 98 +++++++--------------------------------------------- include/linux/mm.h | 3 -- include/linux/rmap.h | 3 ++ mm/internal.h | 26 +++++++++----- mm/memory.c | 81 ++++++++++++------------------------------- mm/page_vma_mapped.c | 16 ++++----- mm/rmap.c | 68 +++++++++++++++++++++++++++++------- 7 files changed, 119 insertions(+), 176 deletions(-) -- 2.11.0