From: Zicheng Wang <wangzicheng@honor.com>
To: Chuanhua Han <hanchuanhua802@gmail.com>,
Lorenzo Stoakes <ljs@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>
Cc: <tao.wangtao@honor.com>, <zhangji1@honor.com>,
Yu Zhao <yuzhao@google.com>,
Kalesh Singh <kaleshsingh@google.com>,
Kairui Song <kasong@tencent.com>, Barry Song <baohua@kernel.org>,
Qi Zheng <qi.zheng@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Axel Rasmussen <axelrasmussen@google.com>,
Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
Baoquan He <baoquan.he@linux.dev>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
David Hildenbrand <david@kernel.org>, <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
Pedro Falcato <pfalcato@suse.de>, Jann Horn <jannh@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>, <linux-doc@vger.kernel.org>,
Matthew Wilcox <willy@infradead.org>,
"Hugh Dickins" <hughd@google.com>,
Ridong Chen <ridong.chen@linux.dev>,
<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/5] mm/mglru: walk page tables under per-VMA locks
Date: Fri, 4 Dec 2026 18:38:56 +0800 [thread overview]
Message-ID: <20261204103856.71027-1-wangzicheng@honor.com> (raw)
In-Reply-To: <20261201131135.2914944-1-hanchuanhua@xiaomi.com>
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
next prev parent reply other threads:[~2026-12-04 10:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 13:11 [RFC PATCH 0/5] mm/mglru: walk page tables under per-VMA locks Chuanhua Han
2026-12-01 13:11 ` [RFC PATCH 1/5] mm/mmap_lock: add vma_start_read_rcu() helper Chuanhua Han
2026-12-01 13:24 ` Lorenzo Stoakes (ARM)
[not found] ` <CAD0eUrbpyNFB7nRRb5g-SothGPj41CScx+FL+_W29N++OSbOcw@mail.gmail.com>
2026-12-02 2:49 ` Suren Baghdasaryan
2026-12-02 4:20 ` chuanhua han
2026-12-02 9:10 ` Lorenzo Stoakes (ARM)
2026-12-02 13:07 ` chuanhua han
2026-12-01 13:11 ` [RFC PATCH 2/5] mm/mglru: split the VMA flag checks out of should_skip_vma() Chuanhua Han
2026-12-01 13:11 ` [RFC PATCH 3/5] mm/mglru: walk page tables under per-VMA locks Chuanhua Han
2026-12-01 13:11 ` [RFC PATCH 4/5] mm/mglru: hand off VMA locks without dropping the PTE lock Chuanhua Han
2026-12-01 13:11 ` [RFC PATCH 5/5] mm/mglru: update the docs for the per-VMA lock walk Chuanhua Han
2026-12-04 10:38 ` Zicheng Wang [this message]
2026-12-04 10:43 ` [RFC PATCH 0/5] mm/mglru: walk page tables under per-VMA locks Barry Song
2026-12-04 11:21 ` Lorenzo Stoakes (ARM)
2026-12-04 16:55 ` chuanhua han
2026-12-04 18:20 ` Suren Baghdasaryan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204103856.71027-1-wangzicheng@honor.com \
--to=wangzicheng@honor.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=baoquan.he@linux.dev \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=hanchuanhua802@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=jannh@google.com \
--cc=kaleshsingh@google.com \
--cc=kasong@tencent.com \
--cc=liam@infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=pfalcato@suse.de \
--cc=qi.zheng@linux.dev \
--cc=rdunlap@infradead.org \
--cc=ridong.chen@linux.dev \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=tao.wangtao@honor.com \
--cc=vbabka@kernel.org \
--cc=weixugc@google.com \
--cc=willy@infradead.org \
--cc=yuanchu@google.com \
--cc=yuzhao@google.com \
--cc=zhangji1@honor.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox