Re: [PATCH v2 0/5] mm: reduce mmap_lock contention and improve page fault performance
From: Suren Baghdasaryan
Date: Sat Jun 20 2026 - 19:49:19 EST
On Fri, May 22, 2026 at 2:31 PM Barry Song <baohua@xxxxxxxxxx> wrote:
>
> >
> > Again this is making me want to sit outside and sip on some lemonade and
> > ice :)
> >
> > Yes - android processes are aggressively multi-threaded, sure of course.
> >
> > The missing bit here is the forking - what, where, why, when?
> >
>
> I really want to know the what, where, why, and when
> as well. But since most applications are not
> open-source, it is basically a black hole for anyone
> other than the owners of those apps.
>
> Let me try to do more investigation to understand what
> is going on, although it is really hard.
> To be honest, I would rather the Android framework
> completely prohibit apps from calling fork(), if
> possible.
>
> > And then you say zygote is sometimes multi-threaded but sometimes
> > single-threaded, which is adding a whole bunch of confusion on top of all
> > that.
> >
> > I don't find these stack trace dumps all that useful (though thanks of
> > course for taking the time to gather them), I think we'd be better off with
> > specific data on forking, in some _concise_ _summarised_ form, ideally with
> > numbers.
> >
> > There's such a thing as too much information :))
>
> This trace shows PF I/O in one thread overlapping
> with a fork() call in another thread.
> But as I explained, I really do not know what kind of
> user behavior is behind it.
>
> >
> > Anyway, again, please let's see a new _RFC_ with the approach proposed by
> > Suren, with some _succinct_ data demonstrating _exactly_ what the problem
> > is, so we can make some headway here.
>
> Okay, sure. Thanks for your patience.
Just checking in on the followup plans. IIUC the RFC mentioned will
try to implement the solution we discussed at LSFMM: splitting
VM_FAULT_RETRY into two flags - one for retrying under per-VMA locks
and another one to fallback to mmap_lock.
Barry, if you need any help or clarification, please do not hesitate
to contact me.
Thanks,
Suren.
>
> >
> > And now I'm off for a cornetto! :)
>
> Sounds good :) Enjoy your cornetto!
>
> Best Regards
> Barry