lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Dec 2020 12:32:52 -0800
From:   Yang Shi <>
To:     Johannes Weiner <>
Cc:     Roman Gushchin <>, Kirill Tkhai <>,
        Shakeel Butt <>,
        Dave Chinner <>,
        Michal Hocko <>,
        Andrew Morton <>,
        Linux MM <>,
        Linux FS-devel Mailing List <>,
        Linux Kernel Mailing List <>
Subject: Re: [v2 PATCH 2/9] mm: memcontrol: use shrinker_rwsem to protect
 shrinker_maps allocation

On Tue, Dec 15, 2020 at 6:10 AM Johannes Weiner <> wrote:
> On Mon, Dec 14, 2020 at 02:37:15PM -0800, Yang Shi wrote:
> > Since memcg_shrinker_map_size just can be changd under holding shrinker_rwsem
> > exclusively, the read side can be protected by holding read lock, so it sounds
> > superfluous to have a dedicated mutex.  This should not exacerbate the contention
> > to shrinker_rwsem since just one read side critical section is added.
> >
> > Signed-off-by: Yang Shi <>
> Acked-by: Johannes Weiner <>
> Thanks Yang, this is a step in the right direction. It would still be
> nice to also drop memcg_shrinker_map_size and (trivially) derive that
> value from shrinker_nr_max where necessary. It is duplicate state.

Thanks! I will take a further look at it.

Powered by blists - more mailing lists