On Tue, May 19, 2026 at 12:17 AM Matthew Wilcox <[email protected]> wrote: > > On Mon, May 18, 2026 at 07:25:54PM +0800, Barry Song wrote: > > We have clearly observed that the `fork()` operations of many > > popular Android apps, such as iQiyi, Baidu Tieba, and 10086, > > end up waiting on page-fault (PF) I/O when the VMA lock is > > held during I/O operations. This has already become a > > practical issue. I also believe this can lead to chained > > waiting, since the global `mmap_lock` blocks all threads that > > need to acquire it. > > It's always been a terrible idea to call fork() from a multithreaded > application. For example, this question: > > https://stackoverflow.com/questions/53601200/calling-fork-on-a-multithreaded-process > > or this lwn thread: https://lwn.net/Articles/674660/ > > Do we have any insight into why these applications are doing this > horrible thing?
I swear I read the two links you shared. But the reality is that as long as people use the Android framework, even the simplest "Hello World" app already runs with 10+ threads :-) main RenderThread ReferenceQueueDaemon FinalizerDaemon FinalizerWatchdogDaemon HeapTaskDaemon Binder:1234_1 Binder:1234_2 Signal Catcher JDWP ... Best Regards Barry
