Re: [PATCH 1/1] mm: prevent a race between process_mrelease and exit_mmap

From: Matthew Wilcox
Date: Wed Oct 27 2021 - 13:37:40 EST


On Wed, Oct 27, 2021 at 09:08:21AM -0700, Suren Baghdasaryan wrote:
> Unconditional mmap_write_lock around free_pgtables in exit_mmap seems
> to me the most semantically correct way forward and the pushback is on
> the basis of regressing performance of the exit path. I would like to
> measure that regression to confirm this. I don't have access to a big
> machine but will ask someone in another Google team to try the test
> Michal wrote here
> https://lore.kernel.org/all/20170725142626.GJ26723@xxxxxxxxxxxxxx/ on
> a server with and without a custom patch.

Sorry to hijack this, but could you ask that team to also test this
patch? I think there's probably a good-sized win here, but I have no
profiles to share at this point. I've only done light testing, and
it may have bugs.

NB: I only did the exit() path here. fork() conversion is left as an
exercise for the reader^W^W Liam.