Re: [PATCH v4 2/2] mm/page_alloc: integrate classzone_idx and high_zoneidx

From: Joonsoo Kim
Date: Mon Mar 23 2020 - 02:00:10 EST


2020ë 3ì 23ì (ì) ìí 2:40, Baoquan He <bhe@xxxxxxxxxx>ëì ìì:
> > > diff --git a/include/trace/events/compaction.h b/include/trace/events/compaction.h
> > > index e5bf6ee..54e5bf0 100644
> > > --- a/include/trace/events/compaction.h
> > > +++ b/include/trace/events/compaction.h
> > > @@ -314,40 +314,44 @@ TRACE_EVENT(mm_compaction_kcompactd_sleep,
> > >
> > > DECLARE_EVENT_CLASS(kcompactd_wake_template,
> > >
> > > - TP_PROTO(int nid, int order, enum zone_type classzone_idx),
> > > + TP_PROTO(int nid, int order, enum zone_type highest_zoneidx),
> > >
> > > - TP_ARGS(nid, order, classzone_idx),
> > > + TP_ARGS(nid, order, highest_zoneidx),
> > >
> > > TP_STRUCT__entry(
> > > __field(int, nid)
> > > __field(int, order)
> > > - __field(enum zone_type, classzone_idx)
> > > + __field(enum zone_type, highest_zoneidx)
> > > ),
> > >
> > > TP_fast_assign(
> > > __entry->nid = nid;
> > > __entry->order = order;
> > > - __entry->classzone_idx = classzone_idx;
> > > + __entry->highest_zoneidx = highest_zoneidx;
> > > ),
> > >
> > > + /*
> > > + * classzone_idx is previous name of the highest_zoneidx.
> > > + * Reason not to change it is the ABI requirement of the tracepoint.
> > > + */
> > > TP_printk("nid=%d order=%d classzone_idx=%-8s",
> > ~~~~~~~~~~ this one could be missed.
>
> Oh, I realized above 'classzone_idx=%-8s' being kept is for the old
> script compatibility? then it's OK.

Yes, this is for userspace compatibility. There are two places that aren't
changed due to compatibility and they are commented on top of the line.

Thanks.

> >
> > And I applied this patch series, use 'git grep classzone_idx' to search
> > any relics, found below classzone_idx leftover in perl script.
> > [~]$ git grep classzone_idx
> > Documentation/trace/postprocess/trace-vmscan-postprocess.pl:my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) classzone_idx=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_skipped=([0-9]*) nr_taken=([0-9]*) lru=([a-z_]*)';
> > Documentation/trace/postprocess/trace-vmscan-postprocess.pl: "isolate_mode", "classzone_idx", "order",