From: Vlastimil Babka <vbabka@suse.cz>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
ktkhai@virtuozzo.com, broonie@kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Linux MM <linux-mm@kvack.org>,
shaoyafang@didiglobal.com
Subject: Re: [PATCH] mm: vmscan: add tracepoints for node reclaim
Date: Thu, 28 Feb 2019 11:44:08 +0100 [thread overview]
Message-ID: <b88ec9aa-4630-353a-955a-3e365d44b5d1@suse.cz> (raw)
In-Reply-To: <CALOAHbB8veCnu2EvTMhH6dJTOcWmozSE+3sKtX9jXheFtJjQUA@mail.gmail.com>
On 2/28/19 11:34 AM, Yafang Shao wrote:
> On Thu, Feb 28, 2019 at 6:21 PM Vlastimil Babka <vbabka@suse.cz> wrote:
>>
>> On 2/28/19 9:14 AM, Yafang Shao wrote:
>>> In the page alloc fast path, it may do node reclaim, which may cause
>>> latency spike.
>>> We should add tracepoint for this event, and also mesure the latency
>>> it causes.
>>>
>>> So bellow two tracepoints are introduced,
>>> mm_vmscan_node_reclaim_begin
>>> mm_vmscan_node_reclaim_end
>>>
>>> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
>>> ---
>>> include/trace/events/vmscan.h | 48 +++++++++++++++++++++++++++++++++++++++++++
>>> mm/vmscan.c | 13 +++++++++++-
>>> 2 files changed, 60 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h
>>> index a1cb913..9310d5b 100644
>>> --- a/include/trace/events/vmscan.h
>>> +++ b/include/trace/events/vmscan.h
>>> @@ -465,6 +465,54 @@
>>> __entry->ratio,
>>> show_reclaim_flags(__entry->reclaim_flags))
>>> );
>>> +
>>> +TRACE_EVENT(mm_vmscan_node_reclaim_begin,
>>> +
>>> + TP_PROTO(int nid, int order, int may_writepage,
>>> + gfp_t gfp_flags, int zid),
>>> +
>>> + TP_ARGS(nid, order, may_writepage, gfp_flags, zid),
>>> +
>>> + TP_STRUCT__entry(
>>> + __field(int, nid)
>>> + __field(int, order)
>>> + __field(int, may_writepage)
>>
>> For node reclaim may_writepage is statically set in node_reclaim_mode,
>> so I'm not sure it's worth including it.
>>
>>> + __field(gfp_t, gfp_flags)
>>> + __field(int, zid)
>>
>> zid seems wasteful and misleading as it's simply derived by
>> gfp_zone(gfp_mask), so I would drop it.
>>
>
> I agree with you that may_writepage and zid is wasteful, but I found
> they are in other tracepoints in this file,
> so I place them in this tracepoint as well.
I see zid only in kswapd waking tracepoints? That's different kind of
event.
> Seems we'd better drop them from other tracepoints as well ?
Hmm seems may_writepage in other tracepoints depends on laptop_mode
which is also a static setting. do_try_to_free_pages() can override it
due to priority, but that doesn't affect the tracepoints. If they are to
be dropped, it would be a separate patch though.
next prev parent reply other threads:[~2019-02-28 10:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 8:14 Yafang Shao
2019-02-28 8:59 ` Souptick Joarder
2019-02-28 9:35 ` Yafang Shao
2019-02-28 10:17 ` Michal Hocko
2019-02-28 10:20 ` Yafang Shao
2019-02-28 10:28 ` Michal Hocko
2019-02-28 10:21 ` Vlastimil Babka
2019-02-28 10:34 ` Yafang Shao
2019-02-28 10:44 ` Vlastimil Babka [this message]
2019-02-28 10:48 ` Yafang Shao
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=b88ec9aa-4630-353a-955a-3e365d44b5d1@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=ktkhai@virtuozzo.com \
--cc=laoar.shao@gmail.com \
--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