Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1151942pxp; Wed, 9 Mar 2022 22:51:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgGl+3dPk/tm5G4EJMVc4Ul0TEEwnq/5FBr6g+4cidcNf4rSlHfmlKWJ99VoRU2IkDim3s X-Received: by 2002:a65:57c9:0:b0:375:7489:1bac with SMTP id q9-20020a6557c9000000b0037574891bacmr2863081pgr.349.1646895102458; Wed, 09 Mar 2022 22:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646895102; cv=none; d=google.com; s=arc-20160816; b=XO9eFtefnS2bSTO4+Qb6IjR+e0/or6TCG/0cPjCnlbILOpuqqNNBIMAC4qGaf+zXxH kLx3pAUew8vs2TFdOHK/kb0E3wnZ5p/JGlAgN7MceD+mefNuhQlV8V8NaDqM5RVqlpPQ oQNR6fxDvAlAvflzFivDkPwSGkCp7ScNGsSJsu8SsLE+I0iQeXMU71Ut2DVRb8ZBVi2D BoOUG0sggg8c1COWqfD4SE4AWUyupWy9fA5jFoIa1pPiKj14JzzkL6dsOAJRRsEW7nhr vuWJMqNliOoYqGup6ZGCc+pPOteC+8eMZUAnqQwgldihTB4HG4R030CXcmCmreJPvxZq zoAQ== 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=IQJaIhmi/QzFmALiltJXNjf6ckrS2EgY1Uh0aPn7MYs=; b=CDKYLxQJ4ZRzHzF+LDZfHcNDYdRoO6ZQmNJgkC3cXYDdWXOAorsYNOEYZBlvw+vjIY fWjcDmTipY8pN+S1LjTF7JG464jB6hRj2QDcfkn5ORtFjgYzbBvQP4Ui4QRtmcc9XCU/ DrQj7CNNzsWEGC82NIzI629SqA2YMnSTbJVaIomCvWEctd/tFjI1vtB+9BZteQk2vcbR KAHlgZiQ399rJy8d77j5MUJA0XeWzihmhtjSGQupe4+YrUlMsTFnuiSZmTaBsEK65F23 kRqAPmA4mALjShZDgRmLxvIP57GSxkNZbo3/LjWHDN4/trkVj5l6DtSHu0srHN+Amu5j KCqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=gHn6uRZh; 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 p15-20020a170903248f00b001515fbb3ac9si3775907plw.135.2022.03.09.22.51.27; Wed, 09 Mar 2022 22:51:42 -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=gHn6uRZh; 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 S238901AbiCJAHU (ORCPT + 99 others); Wed, 9 Mar 2022 19:07:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238896AbiCJAHQ (ORCPT ); Wed, 9 Mar 2022 19:07:16 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CBDEF1EA1 for ; Wed, 9 Mar 2022 16:06:17 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id kx6-20020a17090b228600b001bf859159bfso6770068pjb.1 for ; Wed, 09 Mar 2022 16:06:17 -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=IQJaIhmi/QzFmALiltJXNjf6ckrS2EgY1Uh0aPn7MYs=; b=gHn6uRZhcwc/1/iluj+hvVI/tjLthpe0Akd+MQKuvfdxMcu9PCDly6aCrg472eEh3m TjX0NOdopbKbRdKaTnbzERgZdM/mueEx2YG8+M+5257GEhp393PupeQgUlkt7oFEvDNE 3oK0YaD8xaVKZQHhdXj8we5uTjgvoB98hHYuntfbhhJEs/08fC7MpT6rEISUbYY/ic66 WSvO3h2xy30LL3YTP0oNjR8eybS0lFiAfsfYGA4HOD3rEng97uK2wZ6VlssMAfKNTXSz EKoRjaRuHELjmnQMxekNcgSoQf+ZMttBSndyI4apgf7t9m0BmZJQgb+1OpttRu0tnJ2D 9JGg== 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=IQJaIhmi/QzFmALiltJXNjf6ckrS2EgY1Uh0aPn7MYs=; b=A6ToL4a16EZmmXHD1ohdG4f7HFN4xm/M+4ukI5w0sL4AmkZscd/QM7FZN5h9Z4sAi3 hjUpM/R/Hjg/mB9RtqEv9nqKd2MHQAa+AktGYQSAZisbNwWvTJfEYnk61HpjSnRDD3xL Fs0QTBXmKrih5H7zG3+EnrF8BxitCtRrUM0MKq13jMOTo1jibsohBAc353FSvHrBo2eJ qAwKHC7TE4mQLJAehlalGJOCTvi7OdS8FyZxYKBrozoL7H65ko3IAUSNZ9CsyKfG4GQV iPYCBm60AEsouZtr5oKDHh0oPCKCeg+ThwwQLUnxCgxgwYp5/gvGZhGpzffOLJ81mjqs aLGA== X-Gm-Message-State: AOAM532KVddz8jisxJfzO0K1r3AQgKHPZMesTkpDGUZbLjM8QP0ADw2z jOZBB2xtI0Ema/PftEJWPxxJO9VhlhlpNY6D93PuSw== X-Received: by 2002:a17:902:7296:b0:14b:4bc6:e81 with SMTP id d22-20020a170902729600b0014b4bc60e81mr2305234pll.132.1646870776595; Wed, 09 Mar 2022 16:06:16 -0800 (PST) MIME-Version: 1.0 References: <20220302082718.32268-1-songmuchun@bytedance.com> <20220302082718.32268-3-songmuchun@bytedance.com> In-Reply-To: <20220302082718.32268-3-songmuchun@bytedance.com> From: Dan Williams Date: Wed, 9 Mar 2022 16:06:05 -0800 Message-ID: Subject: Re: [PATCH v4 2/6] dax: fix cache flush on PMD-mapped 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. 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: d92576f1167c dax: does not work correctly with virtual aliasing caches Otherwise, you can add: Reviewed-by: Dan Williams