Re: [PATCH v7 1/2] mm: introduce process_mrelease system call
From: Michal Hocko
Date: Fri Aug 06 2021 - 02:41:49 EST
On Thu 05-08-21 11:37:06, Suren Baghdasaryan wrote:
[...]
> > One question I have is why mmget() and not mmgrab()? I see mmgrab() in
> > oom_kill.c.
>
> You are likely right here. The caller's context probably can't be
> considered a "real user" when reaping the mm. However, we take an
> mmap_lock shortly after, so not sure if in practice there is much
> difference.
> Michal, WDYT?
As explained in other response. mmget is to pin address space to not go
away. You do not need that for this purpose. All you need is to pin mm
to not go away. Address space can be unmapped concurrently.
--
Michal Hocko
SUSE Labs