From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=81.70.206.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380749; b=vhgYFrnYXSXlgypY5eOFQB9fYZaS1w7YCA1bSalHE4ssYV3t7+i0bp9HBWnYYIu+BSuw Qx6q1jctDm80rvp0Bn+vn1DvildRu67RnXNyLrvEiwNrcAGE1xgBVEF00fIh7luDZS9PJ iRxwC0eVzX/vJWgrTwoYfljjVwfqtzeSckTOoU338Lx8ohzGBS2ZNRY2lSOJbD9orZ+Gl vTwMgQTRGGtQiAEerc+r7t9mCNf20uXvsbvBmxdd59GfIVHQsW+1IC1e4IOwD4DMOFhbD dzSE4dNwFvHCgvtSnmUCLKh7sXJxoM84qIySsPa5ORsursEI6D4xm3iDPkQEyPwKnuA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380749; h=DMARC-Filter:dkim-signature:Received:Received:Received:From:To:CC: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Type:Content-Transfer-Encoding:X-Originating-IP: X-ClientProxiedBy; bh=tjh9bHGVZMxJbjczA8CxXjZmJ/oDL9ndk89y4frIoNY=; b=CN81q2vNVbAWJ2agoPVugJvYLwJpMkI0AY8Zfh07t4yRfpxqQRZDCM3qSLQMZmK1A9hz mvn9LogRFfsb/xqkZ8kQirlxFX7UfPC2NJcTG1EX/W1VKS/lj5fihbt4ykyLuNFcQX9di 8exEmrg8GkyGW9magGzQtYMVfhM65cYB5TNsUJLfC1KZraslUexLJp55/OmKJ6rrMr0pJ LUGpnO1BISusAQLuzzUOJLufw3MxoOzUAQCCCgP8CYYy/hw3SYIpQxqlUJQttrUnVDe3B 6LKKe3pPf6LMaJnoNPszEPxuDvfX5DJWvFCEZNKQsaywRw5ohRAd1e9uHrnZ2jPgFJQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=honor.com; spf=pass smtp.mailfrom=honor.com; dkim=pass header.d=honor.com header.i=@honor.com header.a=rsa-sha256 header.s=dkim header.b=CmuKGswc; arc=none smtp.remote-ip=81.70.206.69 Received: from mta20.hihonor.com (mta20.hihonor.com [81.70.206.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 960A7606A322; Fri, 4 Dec 2026 10:39:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 960A7606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=honor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=honor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=honor.com header.i=@honor.com header.a=rsa-sha256 header.s=dkim header.b=CmuKGswc dkim-signature: v=1; a=rsa-sha256; d=honor.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=To:From; bh=tjh9bHGVZMxJbjczA8CxXjZmJ/oDL9ndk89y4frIoNY=; b=CmuKGswcUW1GMksfBS31xUYresZR7JhBUosg369GAtJQlswOmkFJS0TgHTW2KASTXrxJizXtz fQKkl6Urb2imPwI5qOjkR75E7cRpXlrYg8NiGHJK0aQPMVgWQ4IQt/LW52UefMndCZKGo+LJjUe c75/JHsAtcdZgSn4sdqbfzA= Received: from TW003.hihonor.com (unknown [10.77.199.161]) by mta20.hihonor.com (SkyGuard) with ESMTPS id 4jgnzP0rkgzYmnQk; Fri, 4 Dec 2026 18:38:57 +0800 (CST) Received: from TA012-1.hihonor.com (10.77.199.132) by TW003.hihonor.com (10.77.199.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Fri, 4 Dec 2026 18:38:54 +0800 Received: from localhost.localdomain (10.144.5.36) by TA012-1.hihonor.com (10.77.199.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Fri, 4 Dec 2026 18:38:48 +0800 From: Zicheng Wang To: Chuanhua Han , Lorenzo Stoakes , Suren Baghdasaryan , Andrew Morton , CC: , , Yu Zhao , Kalesh Singh , Kairui Song , Barry Song , Qi Zheng , Shakeel Butt , Axel Rasmussen , Yuanchu Xie , Wei Xu , Baoquan He , Baolin Wang , David Hildenbrand , , Vlastimil Babka , Mike Rapoport , Michal Hocko , Pedro Falcato , Jann Horn , Johannes Weiner , Jonathan Corbet , Shuah Khan , Randy Dunlap , , Matthew Wilcox , "Hugh Dickins" , Ridong Chen , Subject: Re: [RFC PATCH 0/5] mm/mglru: walk page tables under per-VMA locks Date: Fri, 4 Dec 2026 18:38:56 +0800 Message-ID: <20261204103856.71027-1-wangzicheng@honor.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20261201131135.2914944-1-hanchuanhua@xiaomi.com> References: <20261201131135.2914944-1-hanchuanhua@xiaomi.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: TW002-1.hihonor.com (10.72.0.137) To TA012-1.hihonor.com (10.77.199.132) Hi Suren, Chuanhua, Lorenzo, We hit the same stalls (140-250ms mmap/munmap/mprotect waits on SurfaceFlinger and Launcher) and have a measurement that may be relevant to the try_lock_next_vma() direction. In 3 dogfood user traces we picked for this problem, each with janky frames over 500ms, a direct reclaim task doing the aging walk holds mmap_lock for 140-250ms. Over 99% of that hold is spent runnable, waiting to be scheduled; the aging walk itself runs for less than 1ms. Each trace has thousands of direct reclaim events inside the jank window. A finer lock narrows who waits, but not how long. The walker runs with preemption enabled while holding the lock, so a round can be preempted mid-way and the lock is then held for the whole scheduling delay. Since the aging walk itself is already fast (<1ms), could we simply disable preemption during the walk's lock-hold window instead of changing the lock? We are testing a ~60-line prototype (no new lock or API) and will send the patch and data separately—mainly wondering whether you would prefer bounding that non-preemptible window at PUD or PMD granularity. Polished-by: LLM :) Thanks, Zicheng