Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2852514pxp; Tue, 22 Mar 2022 07:16:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7qtu/9FDC6GooKxuva/NzGC6JhFGXBbo26CSDCFeFS+oWa3sgT5PY5SyuUcRkrmDEW0+v X-Received: by 2002:a63:4a25:0:b0:382:2f93:546a with SMTP id x37-20020a634a25000000b003822f93546amr16327229pga.116.1647958567305; Tue, 22 Mar 2022 07:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647958567; cv=none; d=google.com; s=arc-20160816; b=axii5mK1rhX1ae+WEuBpYu5+apT5NCuByPt4OjWe4dmMpnlH4u53+C/NMle3/P6GFT LtuxjBlRLHUS8Vyofx+zPEUg8EADC5PqAMBUcPUmnl71e4zwuD/TWTpVuWPobDX56d15 fcOoyISaJ9Rp0IuKCvKcg01d+ibXyNg0LogoHp6I5vunvK6L2SWs+bp6eua0VGPOfJ7W XdpGBANGeWz4ArfMPXwE6ONgzJd+PxSTHjxSW9xo+EkBpXF5ZmWuVqY455BVFACqT/6t 8qBR3bupOs3w2ol2li5iHdfyuShDSd4SfqhEzMTH/7BRnWobA3JLoPvMi5QZqG1U9MkE TEeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PE57yUUD9SrPCLBbUCyjgGk3MoukBa6T3fWyxi6SrV4=; b=W7xOEMYWGzDnn4L+P994FIsoEQi7H+XSx8KCMkSrj117aec5ESudn4BODRFhWSPGKF 4OG9N/gZKrrK99nGbvknrUaCdBT+Eb1hZk+CWFLN92sYR+9ieYOJYYeoBWmoSTBhDprl ljaZz3plz877cxInAyF7K9xBvDY2Bdd4eNhrsS9mbUUc2WzrcxCm9Y51FKhZ+YwbGMEH EbNnTiYbiOgbrFrer/5qF83IkczmZFO2fN3q3SIRhu1uoog9nC2A+FtcUwpZi/hFaw3P vCFGSebgtRMuW/wbu3N+tB3fMvjTS5w1XRRLh1NbC1qiGLQEbgLu1pl2+FzWWhDBEPAr IrJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=s4AgvJNu; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w28-20020a63af1c000000b003816043f078si17256859pge.621.2022.03.22.07.15.53; Tue, 22 Mar 2022 07:16:07 -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=@infradead.org header.s=bombadil.20210309 header.b=s4AgvJNu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231298AbiCVIgE (ORCPT + 99 others); Tue, 22 Mar 2022 04:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231322AbiCVIgB (ORCPT ); Tue, 22 Mar 2022 04:36:01 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D107B4832A; Tue, 22 Mar 2022 01:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=PE57yUUD9SrPCLBbUCyjgGk3MoukBa6T3fWyxi6SrV4=; b=s4AgvJNu5YIQCv3TC7zPFv8LNc GOgCI8kFvtUZqetr9c7bbfPL/wm2WY8OyeCTJPq5sVwINdEfD/F4nGJFm0MabHV1YxcMEPtDq5zMr aVWK94ftsDERQs4M1s8xykXQawIODQJ9/VSlAgwubD7+E6Sqa4WDLYKo06Ro+ChAVSet2WNSLsSC6 p6G/kzHL7j2VVuoLbwN11wdfYSKokrgs8oU2giY8hUecYj32X8sgq7c5q0jrLfSnVVeZxkOSaV7/U LxTy4v+4V2YJ02TfzcvxBS33MjniXU/wWIVFBSN3kOt9VkbctOH5d632AysD2xG3MX6FkIINtg44/ dp39V0LQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWZxz-00AQur-4e; Tue, 22 Mar 2022 08:34:11 +0000 Date: Tue, 22 Mar 2022 01:34:11 -0700 From: Christoph Hellwig To: Muchun Song Cc: 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, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com, smuchun@gmail.com Subject: Re: [PATCH v5 1/6] mm: rmap: fix cache flush on THP pages Message-ID: References: <20220318074529.5261-1-songmuchun@bytedance.com> <20220318074529.5261-2-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220318074529.5261-2-songmuchun@bytedance.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Fri, Mar 18, 2022 at 03:45:24PM +0800, 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 Looks good: Reviewed-by: Christoph Hellwig