Thread (80 messages) 80 messages, 9 authors, 2026-06-23

Re: [PATCH v2 0/5] mm: reduce mmap_lock contention and improve page fault performance

From: Hongru Zhang <hidden>
Date: 2026-06-23 10:10:49
Also in: linux-arm-kernel, linux-mm, linux-riscv, linux-s390, lkml, loongarch

On 6/23/26 10:02, David Hildenbrand wrote:
I know that especially browser usually use fork servers: a tiny
(single-threaded) process just to create new child processes. Any information
regarding the apps above that use fork() on small vs. large processes?
I wrote a second BPF tool (fork_info) that captures nr_threads and
map_count (VMA count) from the calling process at the exact moment
fork() is triggered. Results from 3 representative apps:

  App (category)          Fork caller        Threads   VMAs
  -----------------------------------------------------------
  Taobao (shopping)       DaemonThread-6        526    8,987
  Amap (navigation)       DaemonThread-6        289    7,120
  UC Browser (browser)    OneNativeThread       350    8,144

These are all heavyweight multi-threaded processes (hundreds of threads,
7,000-9,000 VMAs), not fork servers.
Above you write "some call fork() from multiple threads". Any further
information on that?
Xiaohongshu (com.xingin.xhs, social media) is a clear example. In just
tens of seconds of normal usage, fork() was called 22 times from 4
different threads:

  PID     COMM            THREADS    VMAS
  4206    com.xingin.xhs       85    4,140
  4216    Thread-2208          85    4,157
  4208    Thread-2208          90    4,211
  5200    Thread-3200         337    6,519
  5200    Thread-3200         343    6,563
  5200    Thread-3200         361    6,769
  5200    Thread-3200         453    7,793
  5200    Thread-3200         450    7,779
  5202    Thread-2219         459    7,846
  5202    Thread-2219         462    7,875
  5202    Thread-2219         465    7,899
  4219    Thread-2219         465    7,903
  4219    Thread-2219         468    7,922
  5202    Thread-2219         467    7,917
  4219    Thread-2219         467    7,921
  4219    Thread-2219         468    7,929
  5202    Thread-2219         464    7,909
  5202    Thread-2219         460    7,889
  5202    Thread-2219         459    7,884
  4219    Thread-2219         433    7,771
  4219    Thread-2219         433    7,771
  4219    Thread-2219         434    7,778

The process grew from 85 threads / 4,140 VMAs at first fork to
434 threads / 7,778 VMAs at last fork, showing these are long-lived
heavyweight processes that fork repeatedly throughout their lifecycle.

Tracing tool:
  https://gist.github.com/zhr250/ba7725d0ea55594bcafd3cd4806eed98

Hongru
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help