mm/page_alloc: integrate classzone_idx and high_zoneidx
classzone_idx is just different name for high_zoneidx now. So, integrate them and add some comment to struct alloc_context in order to reduce future confusion about the meaning of this variable. The accessor, ac_classzone_idx() is also removed since it isn't needed after integration. In addition to integration, this patch also renames high_zoneidx to highest_zoneidx since it represents more precise meaning. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Baoquan He <bhe@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Michal Hocko <mhocko@kernel.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Ye Xiaolong <xiaolong.ye@intel.com> Link: http://lkml.kernel.org/r/1587095923-7515-3-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
3334a45eb9
commit
97a225e69a
@@ -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",
|
||||
__entry->nid,
|
||||
__entry->order,
|
||||
__print_symbolic(__entry->classzone_idx, ZONE_TYPE))
|
||||
__print_symbolic(__entry->highest_zoneidx, ZONE_TYPE))
|
||||
);
|
||||
|
||||
DEFINE_EVENT(kcompactd_wake_template, mm_compaction_wakeup_kcompactd,
|
||||
|
||||
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)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(kcompactd_wake_template, mm_compaction_kcompactd_wake,
|
||||
|
||||
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)
|
||||
);
|
||||
#endif
|
||||
|
||||
|
@@ -265,7 +265,7 @@ TRACE_EVENT(mm_shrink_slab_end,
|
||||
);
|
||||
|
||||
TRACE_EVENT(mm_vmscan_lru_isolate,
|
||||
TP_PROTO(int classzone_idx,
|
||||
TP_PROTO(int highest_zoneidx,
|
||||
int order,
|
||||
unsigned long nr_requested,
|
||||
unsigned long nr_scanned,
|
||||
@@ -274,10 +274,10 @@ TRACE_EVENT(mm_vmscan_lru_isolate,
|
||||
isolate_mode_t isolate_mode,
|
||||
int lru),
|
||||
|
||||
TP_ARGS(classzone_idx, order, nr_requested, nr_scanned, nr_skipped, nr_taken, isolate_mode, lru),
|
||||
TP_ARGS(highest_zoneidx, order, nr_requested, nr_scanned, nr_skipped, nr_taken, isolate_mode, lru),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(int, classzone_idx)
|
||||
__field(int, highest_zoneidx)
|
||||
__field(int, order)
|
||||
__field(unsigned long, nr_requested)
|
||||
__field(unsigned long, nr_scanned)
|
||||
@@ -288,7 +288,7 @@ TRACE_EVENT(mm_vmscan_lru_isolate,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->classzone_idx = classzone_idx;
|
||||
__entry->highest_zoneidx = highest_zoneidx;
|
||||
__entry->order = order;
|
||||
__entry->nr_requested = nr_requested;
|
||||
__entry->nr_scanned = nr_scanned;
|
||||
@@ -298,9 +298,13 @@ TRACE_EVENT(mm_vmscan_lru_isolate,
|
||||
__entry->lru = lru;
|
||||
),
|
||||
|
||||
/*
|
||||
* classzone is previous name of the highest_zoneidx.
|
||||
* Reason not to change it is the ABI requirement of the tracepoint.
|
||||
*/
|
||||
TP_printk("isolate_mode=%d classzone=%d order=%d nr_requested=%lu nr_scanned=%lu nr_skipped=%lu nr_taken=%lu lru=%s",
|
||||
__entry->isolate_mode,
|
||||
__entry->classzone_idx,
|
||||
__entry->highest_zoneidx,
|
||||
__entry->order,
|
||||
__entry->nr_requested,
|
||||
__entry->nr_scanned,
|
||||
|
Reference in New Issue
Block a user