Re: [PATCH v6 00/12] Add a new mmap locking API wrapping mmap_sem calls

From: Michal Hocko
Date: Tue Jun 09 2020 - 08:03:37 EST


Hi,

On Tue 19-05-20 22:28:56, Michel Lespinasse wrote:
> Reposting this patch series on top of v5.7-rc6. I think this is ready
> for inclusion into the -mm tree; however there were some minor points
> of feedback to address and also it was easier to regenerate a full
> version after the v5.5 (only updating patches 09/10 and 10/10) caused
> some confusion.
>
>
> This patch series adds a new mmap locking API replacing the existing
> mmap_sem lock and unlocks. Initially the API is just implemente in terms
> of inlined rwsem calls, so it doesn't provide any new functionality.
>
> There are two justifications for the new API:
>
> - At first, it provides an easy hooking point to instrument mmap_sem
> locking latencies independently of any other rwsems.
>
> - In the future, it may be a starting point for replacing the rwsem
> implementation with a different one, such as range locks. This is
> something that is being explored, even though there is no wide concensus
> about this possible direction yet.
> (see https://patchwork.kernel.org/cover/11401483/)

Sorry that I am jumping late to the game.

Even though I hoped that the new API would somehow start using a
concept of address ranges, because I believe this is a fundamental lock
granularity for this mmap_sem, this is definitely a step in the right
direction. Getting rid of all direct usage of mmap_sem is an
improvement in itself.

Feel free to add
Acked-by: Michal Hocko <mhocko@xxxxxxxx>

Thanks!
--
Michal Hocko
SUSE Labs