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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 717C7CD5BAE for ; Thu, 5 Sep 2024 12:25:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lLByLv8rw/zOL3j4lfqH8Y8PpLKTX3K0pHjcs2rvP4s=; b=3Xez3zpSO4s6s8YRjAcnvoTkoN jFlcXnhchO1E2/MPfA3NngeesmQe1wFatkkzyICF9mFd5NwLvMvKQ4hXPck29uq4EaMrBG0alJAgl dy+r4tZv2Jk6DV134Uh8mnDnmeqNKjV+GTPO2TRlA8nHOPoHrnMOKTpzUml2T15GCWhLeQJt3LkLo Qfs6ZCwKqhHjGYp0UNTBFVfbib6rpf5byi9/EVuqlS7sLCw8H4amlDG7RfjErz8LdVWjsk1UtJjno xG4Lk+kkiMwI565J9aSI/ysRGkZINNbYEzXsBvgyldr2KDJv80gAZY7Y7NBp+LSdSkpMRBlvNxR+t WPJHDhBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smBXd-00000008IXu-02ha; Thu, 05 Sep 2024 12:24:49 +0000 Received: from out-188.mta0.migadu.com ([2001:41d0:1004:224b::bc]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smBWd-00000008IEv-483j for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 12:23:50 +0000 Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725539026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lLByLv8rw/zOL3j4lfqH8Y8PpLKTX3K0pHjcs2rvP4s=; b=qIprDKky84jYBcTOlWU0VsCg3PCkUABBoUNoabNnPl/kHYtmLYn6JrjyHwQZD2PlANABeN SWQT3EbNY1AeZs6F/KKpmrJh7OKyFFzsvYVx4NEjaerCpC5YiPojpdrWYArdGSJX3H6yJE rdLsViLeoTGcKRE4dGRvnpDBrtxgxck= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: [PATCH v3 12/14] mm: multi-gen LRU: walk_pte_range() use pte_offset_map_rw_nolock() X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20240904084022.32728-13-zhengqi.arch@bytedance.com> Date: Thu, 5 Sep 2024 20:23:05 +0800 Cc: David Hildenbrand , Hugh Dickins , Matthew Wilcox , "Vlastimil Babka (SUSE)" , akpm@linux-foundation.org, rppt@kernel.org, vishal.moola@gmail.com, peterx@redhat.com, ryan.roberts@arm.com, christophe.leroy2@cs-soprasteria.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Content-Transfer-Encoding: 7bit Message-Id: <6867F624-A83C-4A3C-947D-ECFA4925130F@linux.dev> References: <20240904084022.32728-1-zhengqi.arch@bytedance.com> <20240904084022.32728-13-zhengqi.arch@bytedance.com> To: Qi Zheng X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_052348_204987_7F0552EF X-CRM114-Status: UNSURE ( 7.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > On Sep 4, 2024, at 16:40, Qi Zheng wrote: > > In walk_pte_range(), we may modify the pte entry after holding the ptl, so > convert it to using pte_offset_map_rw_nolock(). At this time, the > pte_same() check is not performed after the ptl held, so we should get > pmdval and do pmd_same() check to ensure the stability of pmd entry. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song Thanks.