[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod7v4n62PVvC50VSNV12ZV0WdsY4GOQt68EmY4u5fc9hfQ@mail.gmail.com>
Date: Tue, 3 Jul 2018 12:19:35 -0700
From: Shakeel Butt <shakeelb@...gle.com>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: Matthew Wilcox <willy@...radead.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Philippe Ombredanne <pombredanne@...b.com>,
stummala@...eaurora.org, gregkh@...uxfoundation.org,
Stephen Rothwell <sfr@...b.auug.org.au>,
Roman Gushchin <guro@...com>, mka@...omium.org,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Chris Wilson <chris@...is-wilson.co.uk>, longman@...hat.com,
Minchan Kim <minchan@...nel.org>,
Huang Ying <ying.huang@...el.com>,
Mel Gorman <mgorman@...hsingularity.net>, jbacik@...com,
Guenter Roeck <linux@...ck-us.net>,
LKML <linux-kernel@...r.kernel.org>,
Linux MM <linux-mm@...ck.org>, lirongqing@...du.com,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v8 03/17] mm: Assign id to every memcg-aware shrinker
On Tue, Jul 3, 2018 at 12:13 PM Kirill Tkhai <ktkhai@...tuozzo.com> wrote:
>
> On 03.07.2018 20:58, Matthew Wilcox wrote:
> > On Tue, Jul 03, 2018 at 06:46:57PM +0300, Kirill Tkhai wrote:
> >> shrinker_idr now contains only memcg-aware shrinkers, so all bits from memcg map
> >> may be potentially populated. In case of memcg-aware shrinkers and !memcg-aware
> >> shrinkers share the same numbers like you suggest, this will lead to increasing
> >> size of memcg maps, which is bad for memory consumption. So, memcg-aware shrinkers
> >> should to have its own IDR and its own numbers. The tricks like allocation big
> >> IDs for !memcg-aware shrinkers seem bad for me, since they make the code more
> >> complicated.
> >
> > Do we really have so very many !memcg-aware shrinkers?
> >
> > $ git grep -w register_shrinker |wc
> > 32 119 2221
> > $ git grep -w register_shrinker_prepared |wc
> > 4 13 268
> > (that's an overstatement; one of those is the declaration, one the definition,
> > and one an internal call, so we actually only have one caller of _prepared).
> >
> > So it looks to me like your average system has one shrinker per
> > filesystem, one per graphics card, one per raid5 device, and a few
> > miscellaneous. I'd be shocked if anybody had more than 100 shrinkers
> > registered on their laptop.
> >
> > I think we should err on the side of simiplicity and just have one IDR for
> > every shrinker instead of playing games to solve a theoretical problem.
>
> It just a standard situation for the systems with many containers. Every mount
> introduce a new shrinker to the system, so it's easy to see a system with
> 100 or ever 1000 shrinkers. AFAIR, Shakeel said he also has the similar
> configurations.
>
I can say on our production systems, a couple thousand shrinkers is normal.
Shakeel
Powered by blists - more mailing lists