From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0FA9C433EF for ; Thu, 10 Mar 2022 13:49:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0FBB88D0002; Thu, 10 Mar 2022 08:49:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 083DF8D0001; Thu, 10 Mar 2022 08:49:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E8C848D0002; Thu, 10 Mar 2022 08:49:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0018.hostedemail.com [216.40.44.18]) by kanga.kvack.org (Postfix) with ESMTP id D5EBF8D0001 for ; Thu, 10 Mar 2022 08:49:48 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8F64295B04 for ; Thu, 10 Mar 2022 13:49:48 +0000 (UTC) X-FDA: 79228609656.31.A6C3545 Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) by imf19.hostedemail.com (Postfix) with ESMTP id 7097B1A0018 for ; Thu, 10 Mar 2022 13:49:47 +0000 (UTC) Received: by mail-yb1-f174.google.com with SMTP id f38so11005616ybi.3 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=XQGoMsgGZq+N51LOXCIa5qHe4r7CKsVNzHtF3idWz02KGwQezMkG31YxQ/nC4W0FJN eGMSb9r/pZNbKq29cu5D/0I+8oOjRl2RKiHsOPysvxvomHtt87vB1LmZ9FWXOAzKFAtl qjDNJzog+Lp1BoQtyoYka2bd6Duehx+6CncJFallji08kHYTihwwB5Xvcoiahpzx/sxQ eqQEmKHy0JbTM+/DxZ5rqSBc9VjEzullmu4Zh6WfIA2zzjxHpAIdcl/nTeKz87ZUFMPb smFE0gRuYGY2fXRoOit4kGw0zmHTko0AS5tiU6eox3BD2lmMS7q9C+dw/3iiTC5tRzh9 qTPg== X-Gm-Message-State: AOAM530SgX9iwPEuni8XsjbaWUI7xd7khzJEOxzSw/8HiDQqhzrcL5pt YFbbH3aDqd3CfOXRkrDnCFTjywEiQ23zNgEBC2QNEA== X-Google-Smtp-Source: ABdhPJxEyh0BnHyunA1YVnIuCNPWGZHleKd1WO6N3gi7S+63k2cJ+dICHYCAS3kauxgrvZDRc7AkiSHCwy8gPXQMxcI= 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-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 7097B1A0018 X-Stat-Signature: azsnnir95zssh99qz4s1z4ssi9c66zqo Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="XGmoL/c7"; spf=pass (imf19.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.219.174 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com X-HE-Tag: 1646920187-38229 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.