Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp38160pxp; Thu, 10 Mar 2022 21:53:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoGL8C0PraqbU1/OF1w3Pqgrah/JW0R99kEOA0nVUn0IFVlLimHKP9II401IBbG10eRGWq X-Received: by 2002:a17:903:22d0:b0:151:97f5:db54 with SMTP id y16-20020a17090322d000b0015197f5db54mr9065769plg.58.1646977987108; Thu, 10 Mar 2022 21:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646977987; cv=none; d=google.com; s=arc-20160816; b=nutVdy/45nVHKIwpGRHobUZnMDIe0Qtt0JdjLtJhKiS10VsqA5XJjP+cz/uolsrNyx 7j6Q/UEg+t25ALS4Y0rKN7Nalsbv/Y2EFFsBs+6qviheYo7kxty2u6xLSGV2coNYbMWq kRLJ6bktWuDq6lQcvPgF8aoG1U+98WKeXKl0XarMzM1jFIs75PH8cFErvYslVxq6SKn/ EUjHMM0sgR3dHqiqbTmcHdryKTP2TP4IqvU1uAmZBjzVftyg8dsum6CxMEm5Du+8BrYY rAgMQL6fzhKs4efhF45EwFUi1vzEECcd9SaAQfEFeFGXZjeJR+r9Y17J4+yjuqAakwE3 uZ4w== 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=PUB8geEpJ+XtoTHFW5CyzSR89RxzbZocHBgXZDsT0q4=; b=xrY2vJ0LTLtHt4VxXQ2FenQdd4YiFdOuDPubFNPfWbWOdv+QjLetFeEsdZV+wyk33u h17taZGQ1nVvGRiJWc4uyG+OxNhdq5ErIPBQjqzKOigAYFF4r/k5eQTayDOvj3MAAv84 iHTDIYFI4rcvuWKtbCltR67o/iOL/YLcpGUpQWDYq9hHjQJHN7Xz9kjfxaTQhuBknvuS FgRW4Yd/Idyw7jYVyEqbY+MlaXaw9xaKAWS9x8NErqQcARa/B007MIAfM6NzQdcHku+u +0jJ2AVcHOQDC2g1LAn3R2RRMAfKlthhaqCt0TPr4VdTGDsPKEBxdyWo4jAXytqfawf3 Egfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=otdsgu05; 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 l63-20020a638842000000b0037c97ad202asi6813011pgd.132.2022.03.10.21.52.51; Thu, 10 Mar 2022 21:53:07 -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=otdsgu05; 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 S236845AbiCJADH (ORCPT + 99 others); Wed, 9 Mar 2022 19:03:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238893AbiCJACy (ORCPT ); Wed, 9 Mar 2022 19:02:54 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 745D312223A for ; Wed, 9 Mar 2022 16:01:55 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id t14so3298982pgr.3 for ; Wed, 09 Mar 2022 16:01:55 -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=PUB8geEpJ+XtoTHFW5CyzSR89RxzbZocHBgXZDsT0q4=; b=otdsgu05707Lk9KMy9Xl5aGoGpb6RqPU5UPULqEDsN/2l0x6ZW4fwG3smZmmXYgccr uSOZID4KxBtbRYlE+5DzLmbTAZ+0UWldA4oJxDpKPrEnop8Fo9ENjzluPuJpHAt/f0Ph JWHz1tJmUUKYOA51azuWN3u/HBuHP6xKdAEKkTinas859+sluZ5V6iIwToVN0w545JZ0 3MztadxrOxyAdk25++05k8H4fZKxTQ71SQh5zMwp9yN8iMhkMaVGQTUzYKS4c55c7s98 4/Uv6gYvdgNlFaNfigcT3+pjUGlyDppfCnmg8Tgo1wa+NEPrmpAzqwTGnItaDus8dWJS vbZQ== 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=PUB8geEpJ+XtoTHFW5CyzSR89RxzbZocHBgXZDsT0q4=; b=Vx8Hqt3ZjpvOmBZxg+Lf2yIJbCCNw5g0XQxdRfWYfQ8DfElaM9yEeXqYYwIEvCJv7U mwADVUGrGIQkJ8ujKFLC2N76sTE0kAzXcYA+m7FPnpi/sGP8f+irq5uKpjdQGV+a2TeM /CtNM8JcnFjiKqkRv8zhT+Ffm+G0XHcyHZPAOwCkPAoGgPgwIpoPi3rD9Ce3TOhxdFBi bEyXXy0LcYhRlr3JuKNTg3n/dIkaM5XRWDzaqeGuOt5/TgQVCsv3PEyKQ+2DxdfodUex V7XzfVsMgpXqWZbvW5iOKEM75wJFubcjQhkQpHxzxWVPKGWWG5dRnf3Cq4mXTptNPOSa JKHA== X-Gm-Message-State: AOAM530RVtp3F1THeC5VESttu6fyk41/u3u3IUtH1TVjlS6BJDaN1bsz 5j7B9XMJjXAiKv3mcn/+sBjcpiMKs23rjU5DrYyVbw== X-Received: by 2002:a05:6a02:283:b0:342:703e:1434 with SMTP id bk3-20020a056a02028300b00342703e1434mr1821136pgb.74.1646870515046; Wed, 09 Mar 2022 16:01:55 -0800 (PST) MIME-Version: 1.0 References: <20220302082718.32268-1-songmuchun@bytedance.com> <20220302082718.32268-2-songmuchun@bytedance.com> In-Reply-To: <20220302082718.32268-2-songmuchun@bytedance.com> From: Dan Williams Date: Wed, 9 Mar 2022 16:01:44 -0800 Message-ID: Subject: Re: [PATCH v4 1/6] mm: rmap: fix cache flush on THP pages 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 2, 2022 at 12:29 AM Muchun Song wrote: > > The flush_cache_page() only remove a PAGE_SIZE sized range from the cache. > However, it does not cover the full pages in a THP except a head page. > Replace it with flush_cache_range() to fix this issue. At least, no > problems were found due to this. Maybe because the architectures that > have virtual indexed caches is less. > > Fixes: f27176cfc363 ("mm: convert page_mkclean_one() to use page_vma_mapped_walk()") > Signed-off-by: Muchun Song > Reviewed-by: Yang Shi Reviewed-by: Dan Williams