linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <dchinner@redhat.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Kent Overstreet <kent.overstreet@gmail.com>,
	Hillf Danton <hdanton@sina.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH v3 0/6] mm: introduce shrinker debugfs interface
Date: Fri, 20 May 2022 14:33:29 +1000	[thread overview]
Message-ID: <YocaGTFTB4qLuSw3@rh> (raw)
In-Reply-To: <YoZ7GA9cjQiylEP7@carbon>

On Thu, May 19, 2022 at 10:15:04AM -0700, Roman Gushchin wrote:
> On Mon, May 09, 2022 at 11:38:14AM -0700, Roman Gushchin wrote:
> > There are 50+ different shrinkers in the kernel, many with their own bells and
> > whistles. Under the memory pressure the kernel applies some pressure on each of
> > them in the order of which they were created/registered in the system. Some
> > of them can contain only few objects, some can be quite large. Some can be
> > effective at reclaiming memory, some not.
> > 
> > The only existing debugging mechanism is a couple of tracepoints in
> > do_shrink_slab(): mm_shrink_slab_start and mm_shrink_slab_end. They aren't
> > covering everything though: shrinkers which report 0 objects will never show up,
> > there is no support for memcg-aware shrinkers. Shrinkers are identified by their
> > scan function, which is not always enough (e.g. hard to guess which super
> > block's shrinker it is having only "super_cache_scan").
> > 
> > To provide a better visibility and debug options for memory shrinkers
> > this patchset introduces a /sys/kernel/debug/shrinker interface, to some extent
> > similar to /sys/kernel/slab.
> > 
> > For each shrinker registered in the system a directory is created.
> > As now, the directory will contain only a "scan" file, which allows to get
> > the number of managed objects for each memory cgroup (for memcg-aware shrinkers)
> > and each numa node (for numa-aware shrinkers on a numa machine). Other
> > interfaces might be added in the future.
> > 
> > To make debugging more pleasant, the patchset also names all shrinkers,
> > so that debugfs entries can have meaningful names.
> > 
> > 
> > v3:
> >   1) separated the "scan" part into a separate patch, by Dave
> >   2) merged *_memcg, *_node and *_memcg_node interfaces, by Dave
> >   3) shrinkers naming enhancements, by Christophe and Dave
> >   4) added signal_pending() check, by Hillf
> >   5) enabled by default, by Dave
> 
> Any comments? Thoughts? Objections?

I have no time available to look at this right now, and won't for a
while.

Cheers,

Dave.
-- 
Dave Chinner
dchinner@redhat.com



      reply	other threads:[~2022-05-20  4:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 18:38 Roman Gushchin
2022-05-09 18:38 ` [PATCH v3 1/6] mm: memcontrol: introduce mem_cgroup_ino() and mem_cgroup_get_from_ino() Roman Gushchin
2022-05-22  7:05   ` Muchun Song
2022-05-23 18:12     ` Roman Gushchin
2022-05-24  2:00       ` Muchun Song
2022-05-09 18:38 ` [PATCH v3 2/6] mm: shrinkers: introduce debugfs interface for memory shrinkers Roman Gushchin
2022-05-20 16:45   ` Kent Overstreet
2022-05-21  0:27     ` Roman Gushchin
2022-05-20 16:58   ` Christophe JAILLET
2022-05-20 17:00     ` Kent Overstreet
2022-05-21  0:27     ` Roman Gushchin
2022-05-22 10:36   ` Muchun Song
2022-05-23 18:24     ` Roman Gushchin
2022-05-24  2:06       ` Muchun Song
2022-05-09 18:38 ` [PATCH v3 3/6] mm: shrinkers: provide shrinkers with names Roman Gushchin
2022-05-20 16:41   ` Kent Overstreet
2022-05-21  0:31     ` Roman Gushchin
2022-05-22 11:08   ` Muchun Song
2022-05-23 22:06     ` Roman Gushchin
2022-05-24  9:12       ` Muchun Song
2022-05-22 22:13   ` Dave Chinner
2022-05-24  2:18     ` Roman Gushchin
2022-05-24 23:54       ` Roman Gushchin
2022-05-09 18:38 ` [PATCH v3 4/6] mm: docs: document shrinker debugfs Roman Gushchin
2022-05-09 18:38 ` [PATCH v3 5/6] tools: add memcg_shrinker.py Roman Gushchin
2022-05-09 18:38 ` [PATCH v3 6/6] mm: shrinkers: add scan interface for shrinker debugfs Roman Gushchin
2022-05-22 11:35   ` Muchun Song
2022-05-23 20:54     ` Roman Gushchin
2022-05-24  2:23       ` Muchun Song
2022-05-19 17:15 ` [PATCH v3 0/6] mm: introduce shrinker debugfs interface Roman Gushchin
2022-05-20  4:33   ` Dave Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YocaGTFTB4qLuSw3@rh \
    --to=dchinner@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=hdanton@sina.com \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=roman.gushchin@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox