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 67CA6C433F5 for ; Tue, 25 Jan 2022 00:41:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 924996B0081; Mon, 24 Jan 2022 19:41:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8AE1B6B0083; Mon, 24 Jan 2022 19:41:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74D656B0085; Mon, 24 Jan 2022 19:41:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0052.hostedemail.com [216.40.44.52]) by kanga.kvack.org (Postfix) with ESMTP id 5E3316B0081 for ; Mon, 24 Jan 2022 19:41:47 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 1289018356279 for ; Tue, 25 Jan 2022 00:41:47 +0000 (UTC) X-FDA: 79066956654.18.50AD682 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by imf12.hostedemail.com (Postfix) with ESMTP id B844C40004 for ; Tue, 25 Jan 2022 00:41:46 +0000 (UTC) Received: by mail-pj1-f51.google.com with SMTP id w12-20020a17090a528c00b001b276aa3aabso647484pjh.0 for ; Mon, 24 Jan 2022 16:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=NefrKzx5OHKKvYYf1TiO3FvEJzN+eja5s5Q735QU1F0=; b=hQBTs3rPEaX5QpMhGJN0sQ1KIvn0GCl7Ol7ejuwTF4A8bAYknvdCviHNLZ2J7WURPU 7J411kY6kdxD5njmZAbInNsypAC/jukuL/Fc1TU+7ByEu7bsLqZl1iU4XEat6Vrfk4wi EHHMLFDJS5km0IEUXAO9Mty8aOqT4FF8MxUbD01sNJaQ3fiFgKVwWa/2dFfdEC9VMauL eEZmOUYJITLEQDTN8XjGXbgfTWn9erMQxRhNaAofRKQmFxar0KImFrYedGHcE+WElgfO z78aBat3R2A7j99osBhvSALy6qYnr/XDCeQp+b3zBjJ6ANjLScbli0FpYKg0a00VboQK b34g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=NefrKzx5OHKKvYYf1TiO3FvEJzN+eja5s5Q735QU1F0=; b=xnNiTpdM+LJyryr8/09pWZ2cSF0/7XMKanK5DOFmudZNW/sJmgKJbiVGFrNh/kr2F+ TCNBQi8uJc95UwijZx7w/LW4EnZwGucN+lQCNU0LLUUsPD2l1QT+OAr7PD5wKWotj0G4 wnijgIgggjl70yRLFfHHFqeCjmNfoh8IiPhX50e/zeZIeJTlhV9Aglq+kMVi15NU+EIT nLH+MaT93OMYJgJaHcZSssw7pGX/mvo78TgYwNObgUiXtM8za9XROVr6ZJIrCF+SNSyC T6FqBHk8I0sX4958S+mLkYrdbdsxZaBE+rKtFn7S+hBtNpZ74ORvGibz9/FadEavK8fg 643w== X-Gm-Message-State: AOAM530CTvr8aPRkHCO2CCLYmeiP0acfHzjt0PVvNuDNAV0jvrl0GIjC Ze2JH4TDIu0+tXfbX97QmDGpQQ== X-Google-Smtp-Source: ABdhPJzY2YXYLCkrS4vtJeyIT+l3DZOSE+RZqG87uCqApw6tGl6rk3GXgFX62r1zW7xY1DkqAl2eMA== X-Received: by 2002:a17:902:e88a:b0:14b:3aa4:4d17 with SMTP id w10-20020a170902e88a00b0014b3aa44d17mr9876178plg.160.1643071305403; Mon, 24 Jan 2022 16:41:45 -0800 (PST) Received: from [2620:15c:29:204:1f99:bd65:fcbb:146c] ([2620:15c:29:204:1f99:bd65:fcbb:146c]) by smtp.gmail.com with ESMTPSA id me4sm471426pjb.26.2022.01.24.16.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 16:41:44 -0800 (PST) Date: Mon, 24 Jan 2022 16:41:43 -0800 (PST) From: David Rientjes To: Zi Yan cc: Muchun Song , akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, duanxiongchun@bytedance.com, Lars Persson Subject: Re: [PATCH v2 2/2] mm: fix missing cache flush for all tail pages of THP In-Reply-To: <5D9B52E1-A74B-4964-AACF-ADB91536C4C0@nvidia.com> Message-ID: <91608087-a650-bf1c-a225-7afd63adf63d@google.com> References: <20220124051752.83281-1-songmuchun@bytedance.com> <20220124051752.83281-2-songmuchun@bytedance.com> <4d5044e7-cac9-b6e6-1467-59ea6010b0f5@google.com> <5D9B52E1-A74B-4964-AACF-ADB91536C4C0@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="447496086-858381783-1643071304=:26091" X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: B844C40004 X-Stat-Signature: 5s6fsijz484t3gfb8b9hw41kq8wzisba Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=hQBTs3rP; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf12.hostedemail.com: domain of rientjes@google.com designates 209.85.216.51 as permitted sender) smtp.mailfrom=rientjes@google.com X-Rspam-User: nil X-HE-Tag: 1643071306-106555 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000062, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --447496086-858381783-1643071304=:26091 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 24 Jan 2022, Zi Yan wrote: > >> The D-cache maintenance inside move_to_new_page() only consider one = page, > >> there is still D-cache maintenance issue for tail pages of THP. Fix = this > >> by not using flush_dcache_folio() since it is not backportable. > >> > > > > The mention of being backportable suggests that we should backport th= is, > > likely to 4.14+. So should it be marked as stable? >=20 > Hmm, after more digging, I am not sure if the bug exists. For THP migra= tion, > flush_cache_range() is used in remove_migration_pmd(). The flush_dcache= _page() > was added by Lars Persson (cc=E2=80=99d) to solve the data corruption o= n MIPS[1], > but THP migration is only enabled on x86_64, PPC_BOOK3S_64, and ARM64. >=20 > To make code more consistent, I guess flush_cache_range() in remove_mig= ration_pmd() > can be removed, since it is superseded by the flush_dcache_page() below= . >=20 > The Fixes can be dropped. Let me know if I miss anything. >=20 Yeah, I don't think the Fixes needs to exist here because there doesn't=20 appear to be an issue today. We likely need to choose one of the two=20 paths from above to handle the flush only in a single place. --447496086-858381783-1643071304=:26091--