Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1530378pxp; Thu, 10 Mar 2022 07:14:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAKqXCubcI5MaPKa4j0ww56Oqcyh+qYYs3QAOn7fFJFibkC4aWVdKoGXtvSTOm0SLmDTgG X-Received: by 2002:a17:902:7296:b0:151:62b1:e2b0 with SMTP id d22-20020a170902729600b0015162b1e2b0mr5516709pll.165.1646925287019; Thu, 10 Mar 2022 07:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646925287; cv=none; d=google.com; s=arc-20160816; b=pQXHAQ0N6cKkEw42C1sfQl68f+VAYwOdAb2Mf0tPhvApvGmVwGRZUFjRFMPx4I/94d XFQSnx7gTIF1aZ7Nr13caiCPjxwFplgSouFQVg3JJ5BSQ68efib6KLuG/3MdQru1tOTt JZ3Xo1wxv/davwlWiObDH8vK3d/QjSUUBlx81VL53aHkViDOvd2K/+NOyXJwa+1vb03y pMYftIg8PPKF3HPUPMw2Mwgzir9xkDQ0r2ikM/iXLQnMqbavReBXVUNoUNBKqREUXjZM /jHcO2tRIDuZ3NDFh2FePnPxP11iWfkdOOaoVdd2IjQPhIK9uviR4xti6ASd9Sv/SMYk 1YoQ== 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=YrHkxxw7wa90Lz7KvljazCkAUUcPibWKOq87Yk0/n0Y=; b=WC1YaKYbVjM5HtmSMWZSbHNl5SDWZCTLlMHs5RwGj+YRaGHWa23iLHZc8Nft/W5VcF tBEPnTT5FaheumisT/FC2xKyWB+nU8sso8zvfaaSZr+HzM2yveBzQrFdkksf7GVPOUvx swzbPojxuEi0bDNVfs5uvqUcxw8FSN5N1c349qKd+JYZP7qChyuFh17Y7ESDBy3Bubp/ RYZNrpAEaLhJYGMr0tx1YisLrdFnX7kqtdBzOC3z4fJ1qm4Bw0hL1Tm5aR2SABfm3WkH lUkU6U/4N5oj7ZsDwuVRfT1IL8XJoj8LB7zgDjHFe95Fp8XiNstt35OR2Fmkgfy1Wdmc brdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="XGmoL/c7"; 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 lp8-20020a17090b4a8800b001bd14e01f90si5988446pjb.126.2022.03.10.07.14.24; Thu, 10 Mar 2022 07:14:46 -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="XGmoL/c7"; 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 S242557AbiCJNuu (ORCPT + 99 others); Thu, 10 Mar 2022 08:50:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242553AbiCJNus (ORCPT ); Thu, 10 Mar 2022 08:50:48 -0500 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DDB114F98C for ; Thu, 10 Mar 2022 05:49:47 -0800 (PST) Received: by mail-yb1-xb2b.google.com with SMTP id l2so10972784ybe.8 for ; Thu, 10 Mar 2022 05:49:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YrHkxxw7wa90Lz7KvljazCkAUUcPibWKOq87Yk0/n0Y=; b=XGmoL/c7V6Yac4ZEaR34Gjm6a6GdVsGuTpFSzLBHc7yEcOzghG/dIhCfJ+IGa6DGll um2nX+BPpcofKOEbHuoL0ARr8fftC54cYzbFusMr6qktOlTX3nwet/pOE/oOrbEgTbIm srktgS+dbasgTIFOXTRuTk/81fHPS2YRD5Neg1yH/Cl5HvDHv3i0A72w/W3xYjyBQMzc EsCvzG6S6GbCocy2VVx00HQUHM2UZlwJ+TSmxKTBTpCMToZr7jfpd1ggOOExyE3B8Yrg WIa0Nno/JDdKOiGkQZstYOF7gMjwyDZY62fKy6S1uh2KkxNO/Jr9NuUMbgUc+oyiHHoM aWWg== 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=YrHkxxw7wa90Lz7KvljazCkAUUcPibWKOq87Yk0/n0Y=; b=kC82jHiKZdeltID1v/JDuc/kWIO3w5o5mcOMRiIyo1MXDP3hOjM15BgM6AOJqL7cbq Zd+YNcj6xV7bKRf/liqJrP87QRao/tV3jhcTte+zIZ+9ckaofnZnNfnPbOUm3o8u+Jmd 6PHVRIgCeWVXCM43SHsEtAZmYjuvbICdbF056IAwBgjYos+0qwSI/WPMaHGd/qznyA6q PABUowX8J8qGsoW7WkhYAMBgaymn2B6VPb5LV9iGsOFdjmeKk9ubRI8OSg8L/i+8luOH NY2iZ8p5POZEJHlzoOUKLy+Tmh1HjKxvEQJgNfI0McxXySJRy1wUdfU7FZ4dIiGTktyv GLag== X-Gm-Message-State: AOAM533naME6XbBU8LoEqdN3UMTWU1wV3/15a7xuNv/IgJyWXbnkcrRv FPTxVvmGd7NNk6zPmn6kW5qmzEXFDHbHsJSTidmp7g== X-Received: by 2002:a25:8390:0:b0:629:2839:9269 with SMTP id t16-20020a258390000000b0062928399269mr3888598ybk.246.1646920186546; Thu, 10 Mar 2022 05:49:46 -0800 (PST) MIME-Version: 1.0 References: <20220302082718.32268-1-songmuchun@bytedance.com> <20220302082718.32268-3-songmuchun@bytedance.com> In-Reply-To: From: Muchun Song Date: Thu, 10 Mar 2022 21:48:01 +0800 Message-ID: Subject: Re: [PATCH v4 2/6] dax: fix cache flush on PMD-mapped pages To: Dan Williams Cc: Matthew Wilcox , Jan Kara , Al Viro , Andrew Morton , Alistair Popple , Yang Shi , Ralph Campbell , Hugh Dickins , Xiyu Yang , "Kirill A. Shutemov" , Ross Zwisler , Christoph Hellwig , linux-fsdevel , Linux NVDIMM , Linux Kernel Mailing List , Linux MM , Xiongchun duan , 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=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 On Thu, Mar 10, 2022 at 8:06 AM Dan Williams wrote: > > 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. > > This needs to clarify that this is just a documentation issue with the > respect to properly documenting the expected usage of cache flushing > before modifying the pmd. However, in practice this is not a problem > due to the fact that DAX is not available on architectures with > virtually indexed caches per: Right. I'll add this into the commit log. > > d92576f1167c dax: does not work correctly with virtual aliasing caches > > Otherwise, you can add: > > Reviewed-by: Dan Williams Thanks.