linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Souptick Joarder <jrdr.linux@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	shaoyafang@didiglobal.com
Subject: Re: [PATCH] mm: compaction: some tracepoints should be defined only when CONFIG_COMPACTION is set
Date: Wed, 13 Mar 2019 00:29:57 +0800	[thread overview]
Message-ID: <CALOAHbBR119mzbkkQ5fmGQ5Bqxu2O4EFgq89gVRXqXN+USzDEA@mail.gmail.com> (raw)
In-Reply-To: <20190312161803.GC5721@dhcp22.suse.cz>

On Wed, Mar 13, 2019 at 12:18 AM Michal Hocko <mhocko@kernel.org> wrote:
>
> On Sat 02-03-19 12:38:58, Yafang Shao wrote:
> > Only mm_compaction_isolate_{free, migrate}pages may be used when
> > CONFIG_COMPACTION is not set.
> > All others are used only when CONFIG_COMPACTION is set.
>
> Why is this an improvement?
>

After this change, if CONFIG_COMPACTION is not set, the tracepoints
that only work when CONFIG_COMPACTION is set will not be exposed to
the usespace.
Without this change, they will always be expose in debugfs no matter
CONFIG_COMPACTION is set or not.

That's an improvement.

> > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > ---
> >  include/trace/events/compaction.h | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/trace/events/compaction.h b/include/trace/events/compaction.h
> > index 6074eff..3e42078 100644
> > --- a/include/trace/events/compaction.h
> > +++ b/include/trace/events/compaction.h
> > @@ -64,6 +64,7 @@
> >       TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken)
> >  );
> >
> > +#ifdef CONFIG_COMPACTION
> >  TRACE_EVENT(mm_compaction_migratepages,
> >
> >       TP_PROTO(unsigned long nr_all,
> > @@ -132,7 +133,6 @@
> >               __entry->sync ? "sync" : "async")
> >  );
> >
> > -#ifdef CONFIG_COMPACTION
> >  TRACE_EVENT(mm_compaction_end,
> >       TP_PROTO(unsigned long zone_start, unsigned long migrate_pfn,
> >               unsigned long free_pfn, unsigned long zone_end, bool sync,
> > @@ -166,7 +166,6 @@
> >               __entry->sync ? "sync" : "async",
> >               __print_symbolic(__entry->status, COMPACTION_STATUS))
> >  );
> > -#endif
> >
> >  TRACE_EVENT(mm_compaction_try_to_compact_pages,
> >
> > @@ -195,7 +194,6 @@
> >               __entry->prio)
> >  );
> >
> > -#ifdef CONFIG_COMPACTION
> >  DECLARE_EVENT_CLASS(mm_compaction_suitable_template,
> >
> >       TP_PROTO(struct zone *zone,
> > @@ -296,7 +294,6 @@
> >
> >       TP_ARGS(zone, order)
> >  );
> > -#endif
> >
> >  TRACE_EVENT(mm_compaction_kcompactd_sleep,
> >
> > @@ -352,6 +349,7 @@
> >
> >       TP_ARGS(nid, order, classzone_idx)
> >  );
> > +#endif
> >
> >  #endif /* _TRACE_COMPACTION_H */
> >
> > --
> > 1.8.3.1
> >
>
> --
> Michal Hocko
> SUSE Labs

  reply	other threads:[~2019-03-12 16:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02  4:38 [PATCH] mm: compaction: show gfp flag names in try_to_compact_pages tracepoint Yafang Shao
2019-03-02  4:38 ` [PATCH] mm: compaction: some tracepoints should be defined only when CONFIG_COMPACTION is set Yafang Shao
2019-03-12 16:18   ` Michal Hocko
2019-03-12 16:29     ` Yafang Shao [this message]
2019-03-12 16:44       ` Michal Hocko
2019-03-12 16:48         ` Yafang Shao
2019-03-02 23:04 ` [PATCH] mm: compaction: show gfp flag names in try_to_compact_pages tracepoint kbuild test robot
2019-03-04  2:25   ` Yafang Shao
2019-03-12 16:17 ` Michal Hocko
2019-03-14  8:30 ` Vlastimil Babka

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=CALOAHbBR119mzbkkQ5fmGQ5Bqxu2O4EFgq89gVRXqXN+USzDEA@mail.gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=shaoyafang@didiglobal.com \
    --cc=vbabka@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).