Re: [PATCH v2] mm/vmscan: expose cgroup_ino for memcg reclaim tracepoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 23, 2019 at 3:33 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sun, 12 May 2019 16:25:28 +0800 Yafang Shao <laoar.shao@xxxxxxxxx> 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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux