linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	shaoyafang@didiglobal.com,  Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH v2] mm/vmscan: expose cgroup_ino for memcg reclaim tracepoints
Date: Thu, 23 May 2019 09:24:26 +0800	[thread overview]
Message-ID: <CALOAHbBYj-Y5fLEDusHO2DM4ni4CskeS9Qw=e=RqY1dLj-C=2w@mail.gmail.com> (raw)
In-Reply-To: <20190522123314.e17fc708ff6548b9b621d6ad@linux-foundation.org>

On Thu, May 23, 2019 at 3:33 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Sun, 12 May 2019 16:25:28 +0800 Yafang Shao <laoar.shao@gmail.com> wrote:
>
> > We can use the exposed cgroup_ino to trace specified cgroup.
> >
> > For example,
> > step 1, get the inode of the specified cgroup
> >       $ ls -di /tmp/cgroupv2/foo
> > step 2, set this inode into tracepoint filter to trace this cgroup only
> >       (assume the inode is 11)
> >       $ cd /sys/kernel/debug/tracing/events/vmscan/
> >       $ echo 'cgroup_ino == 11' > mm_vmscan_memcg_reclaim_begin/filter
> >       $ echo 'cgroup_ino == 11' > mm_vmscan_memcg_reclaim_end/filter
>
> Seems straightforward enough.
>
> But please explain the value of such a change.  What is wrong with the
> current situation and how does this change improve things?  A simple
> use-case scenario would be good.
>
> I can guess why it is beneficial, but I'd rather not guess!
>

Got it.
The reason I made this change is to trace a specific container.

Sometimes there're lots of containers on one host.
Some of them are not important at all, so we don't care whether them
are under memory pressure.
While some of them are important, so we want't to know if these
containers are doing memcg reclaim and
how long this relaim takes.

Without this change, we don't know the memcg reclaim happend in which
container.

Thanks
Yafang


      reply	other threads:[~2019-05-23  1:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-12  8:25 Yafang Shao
2019-05-22 19:33 ` Andrew Morton
2019-05-23  1:24   ` Yafang Shao [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='CALOAHbBYj-Y5fLEDusHO2DM4ni4CskeS9Qw=e=RqY1dLj-C=2w@mail.gmail.com' \
    --to=laoar.shao@gmail.com \
    --cc=9erthalion6@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=shaoyafang@didiglobal.com \
    /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