[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231125173802.pfhalf27kxk3wavy@google.com>
Date: Sat, 25 Nov 2023 17:38:02 +0000
From: Shakeel Butt <shakeelb@...gle.com>
To: Dmitry Rokosov <ddrokosov@...utedevices.com>
Cc: rostedt@...dmis.org, mhiramat@...nel.org, hannes@...xchg.org,
mhocko@...nel.org, roman.gushchin@...ux.dev, muchun.song@...ux.dev,
mhocko@...e.com, akpm@...ux-foundation.org, kernel@...rdevices.ru,
rockosov@...il.com, cgroups@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH v3 2/2] mm: memcg: introduce new event to trace shrink_memcg
On Sat, Nov 25, 2023 at 11:01:37AM +0300, Dmitry Rokosov wrote:
[...]
> > > + trace_mm_vmscan_memcg_shrink_begin(sc->order,
> > > + sc->gfp_mask,
> > > + memcg);
> > > +
> >
> > If you place the start of the trace here, you may have only the begin
> > trace for memcgs whose usage are below their min or low limits. Is that
> > fine? Otherwise you can put it just before shrink_lruvec() call.
> >
>
> From my point of view, it's fine. For situations like the one you
> described, when we only see the begin() tracepoint raised without the
> end(), we understand that reclaim requests are being made but cannot be
> satisfied due to certain conditions within memcg (such as limits).
>
> There may be some spam tracepoints in the trace pipe, which is a disadvantage
> of this approach.
>
> How important do you think it is to understand such situations? Or do
> you suggest moving the begin() tracepoint after the memcg limits checks
> and don't care about it?
>
I was mainly wondering if that is intentional. It seems like you as
first user of this trace has a need to know that a reclaim for a given
memcg was triggered but due to min/low limits no reclaim was done. This
is a totally reasonable use-case.
Powered by blists - more mailing lists