Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp644859pxm; Wed, 2 Mar 2022 05:52:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUYCRapwHujXJotWx/CBmnUkgQ9RBKgLSFYDChDQ8nkXxzluvdKwun5u0kM27ftFWx+XhV X-Received: by 2002:a05:6402:1435:b0:410:d2e1:e6dc with SMTP id c21-20020a056402143500b00410d2e1e6dcmr29632622edx.138.1646229129674; Wed, 02 Mar 2022 05:52:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646229129; cv=none; d=google.com; s=arc-20160816; b=FtyDzDS3FOyk9zcF/kjPAdw5tWF5o2km7lHPcvfFbS7ZuU8AiP9lwnkUOA3ZC2+iDK RNnsmwbsoiXcd493+eEGLHg3XsHbK702hcd28iUQOSMsWpLo7O7bnum6gVFAfPq/BPYr Ix2QBIdzn7IpGZWVNg2fDPagWIIlO48fmQvKUgjqj4pfKr87VxN44D4jSu71MbgoD7V5 QWoI0IyLzl5lMtOCkUUxVAr7beHfrhMvOTpHW6Tno8+ZvB53NFqDTjaJCTLIYpqZzuID C7zUZ6xvCtgWqilOUXlcCTVGFlEh6V+drTg9T42sdXTVXbVIJYdT2tOl9Pue/gjXtpCZ X3TQ== 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=nhj2UYDv6lhlSNPLYeAs8t7voAVPXKimrviFdjCHzWM=; b=XLmXKInAXshgOlvnrV3o+/g451CNTvuFXalNlHckx4Z4OmCxNrAgvJLAG0GCxDxe9I 0J5JVHn9xSrjl4pTAN5g1okOiR0qSKtDixAlEqp8pe9dqHKcJAQ/1XbqWZwqqkmUHN1r jn0z08Lf32f6uaCu+0KcutYDxDSIWPrCny/EGt0TWZwDp+uerCaWEVSheAKgvv2EabK2 zzU37QcsQ2lWiao9mZHf9jel8YMJeOL/jgX2kfBN6OOa1R/CGIXUMJOgLHt5cW90RzNc 6u2EsjDX/8UQOK7ZzqED3LlDYOed0Tn5z3UkgQaQRrnG95ALKPtnIpQ6xQpKNMPGpyTz UqMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=DApuqsEm; 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 sc16-20020a1709078a1000b006da7d677f1dsi428636ejc.811.2022.03.02.05.51.46; Wed, 02 Mar 2022 05:52:09 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=DApuqsEm; 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 S234951AbiCBI3w (ORCPT + 99 others); Wed, 2 Mar 2022 03:29:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239666AbiCBI3s (ORCPT ); Wed, 2 Mar 2022 03:29:48 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B4833916F for ; Wed, 2 Mar 2022 00:29:05 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id q11so930634pln.11 for ; Wed, 02 Mar 2022 00:29:05 -0800 (PST) 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=nhj2UYDv6lhlSNPLYeAs8t7voAVPXKimrviFdjCHzWM=; b=DApuqsEmjJNLujancfXfCthOkTnRIUPq28/r6tOxkHmRYgOlkugPPK0h8zAh8enpIU HfkQBBHhLbFz8qxRq7E2RLuHrElDGGUHS9Y244UdqIirJhWbIHaCrn4YF7xafhgTecpu x6OH95W7ts5LUCdSkrPRN+VLxTqzK7oKM7OtnhOIOVkuakDHhP+07oAY8HWOUrVKWwpS DnRwLDlUAcWgA1CnWdFtO0QOL8kLiRQ+vjGLe4BEgo4v9XJAX76t8Q0sNmUSx1tdL1/b w7Y2MRd1la+tiYmu/lVxcH6LXEof0W4BIhpWEx+hwGiQJUbmqWHEmQaFjYs8VD1Hu04i l7tw== 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=nhj2UYDv6lhlSNPLYeAs8t7voAVPXKimrviFdjCHzWM=; b=KIMbQVYCCYLXGVBAHp/uJQlZ9BSDEcZvtCxuvIroRvC270+A4X9Fr3sCC54Y+Gf31v wZAn+0IdZBaBm/I9s5HIUMfyvSkuy6+nFEm44JrWaw2fhAnIFFujQ/lxxrl+TfstjaCs LbjRgNaQB/QGAT5A5b5i3Z02RbPBS+NSvMfjPwcMefI7NlGrS4bU5CqEre21/BSuvXXI OtWk11hkSEp5UWKCoN4Y3MDfO2FM2IVEFeNJpNYTPsqA9O/IbXYwZyOCF5lZE02d6bCC 2nakA+kk/EAl1dcDsNkNmv65KV1uP5i+hNuEyUfIVOuLST6v3TYMY3/0TtysN430zmxR 5axg== X-Gm-Message-State: AOAM531QxrPk72skbHVj5qVxQ5FlztVkg+ItR/sCoRFO4VIqSeRdshG3 F6BLe4QHFWi0JmlE4KHaIlRQLg== X-Received: by 2002:a17:902:e5c4:b0:151:9bf6:f47f with SMTP id u4-20020a170902e5c400b001519bf6f47fmr635388plf.110.1646209745090; Wed, 02 Mar 2022 00:29:05 -0800 (PST) Received: from FVFYT0MHHV2J.bytedance.net ([61.120.150.70]) by smtp.gmail.com with ESMTPSA id a20-20020a056a000c9400b004f396b965a9sm20922228pfv.49.2022.03.02.00.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 00:29:04 -0800 (PST) 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 v4 0/6] Fix some bugs related to ramp and dax Date: Wed, 2 Mar 2022 16:27:12 +0800 Message-Id: <20220302082718.32268-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=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 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(). 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: remove range parameter from follow_invalidate_pte() fs/dax.c | 82 +++++----------------------------------------------- include/linux/mm.h | 3 -- include/linux/rmap.h | 3 ++ mm/internal.h | 26 +++++++++++------ mm/memory.c | 23 ++------------- mm/page_vma_mapped.c | 5 ++-- mm/rmap.c | 68 +++++++++++++++++++++++++++++++++++-------- 7 files changed, 89 insertions(+), 121 deletions(-) -- 2.11.0