Re: [PATCH] mm: vmscan: Replace shrinker_rwsem trylocks with SRCU protection

From: Michal Hocko
Date: Wed Sep 29 2021 - 04:06:29 EST

On Mon 27-09-21 09:53:59, Sultan Alsawaf wrote:
> On Mon, Sep 27, 2021 at 10:36:36AM +0200, Michal Hocko wrote:
> > Can you be more specific about those scenarios please?
> I see frequent tmpfs mounts/unmounts in Android which result in lots of
> superblocks being created and destroyed, and each superblock has its own
> shrinker.

This is an important detail to mention in the changelog. Including some
details about the scale of the problem.

> > I have a vague recollection that this approach has been proposed in the
> > past. Have you checked previous attempts?
> I wasn't aware that there were previous attempts. Is this [1] the previous
> attempt you're thinking of? It seems like the thread just died out. Was the main
> gripe that always enabling CONFIG_SRCU increased the kernel's size too much when
> tinyfication was desired?

There were more discussions. I have also found
My memory is quite dim and I do not have time to re-read those
discussions again right now. But if I remember correctly the last one
has died out because a deeper evaluation between the SRCU and rw
semaphores was required.

> Sultan
> [1]

Michal Hocko