[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201215140754.GD379720@cmpxchg.org>
Date: Tue, 15 Dec 2020 15:07:54 +0100
From: Johannes Weiner <hannes@...xchg.org>
To: Yang Shi <shy828301@...il.com>
Cc: guro@...com, ktkhai@...tuozzo.com, shakeelb@...gle.com,
david@...morbit.com, mhocko@...e.com, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [v2 PATCH 2/9] mm: memcontrol: use shrinker_rwsem to protect
shrinker_maps allocation
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 <shy828301@...il.com>
Acked-by: Johannes Weiner <hannes@...xchg.org>
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.
Powered by blists - more mailing lists