Skip to content

Commit 48e6561

Browse files
x-y-zakpm00
authored andcommitted
mm/page_alloc: remove trace_mm_alloc_contig_migrate_range_info()
The trace event has not recorded the right data since it was introduced at commit c8b3600 ("mm: add alloc_contig_migrate_range allocation statistics"). Remove it. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Zi Yan <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Acked-by: David Hildenbrand <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: Brendan Jackman <[email protected]> Cc: David Rientjes <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Martin Liu <[email protected]> Cc: "Masami Hiramatsu (Google)" <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Richard Chang <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 5119145 commit 48e6561

File tree

2 files changed

+3
-69
lines changed

2 files changed

+3
-69
lines changed

include/trace/events/kmem.h

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -304,46 +304,6 @@ TRACE_EVENT(mm_page_alloc_extfrag,
304304
__entry->change_ownership)
305305
);
306306

307-
#ifdef CONFIG_CONTIG_ALLOC
308-
TRACE_EVENT(mm_alloc_contig_migrate_range_info,
309-
310-
TP_PROTO(unsigned long start,
311-
unsigned long end,
312-
unsigned long nr_migrated,
313-
unsigned long nr_reclaimed,
314-
unsigned long nr_mapped,
315-
acr_flags_t alloc_flags),
316-
317-
TP_ARGS(start, end, nr_migrated, nr_reclaimed, nr_mapped, alloc_flags),
318-
319-
TP_STRUCT__entry(
320-
__field(unsigned long, start)
321-
__field(unsigned long, end)
322-
__field(unsigned long, nr_migrated)
323-
__field(unsigned long, nr_reclaimed)
324-
__field(unsigned long, nr_mapped)
325-
__field(acr_flags_t, alloc_flags)
326-
),
327-
328-
TP_fast_assign(
329-
__entry->start = start;
330-
__entry->end = end;
331-
__entry->nr_migrated = nr_migrated;
332-
__entry->nr_reclaimed = nr_reclaimed;
333-
__entry->nr_mapped = nr_mapped;
334-
__entry->alloc_flags = alloc_flags;
335-
),
336-
337-
TP_printk("start=0x%lx end=0x%lx alloc_flags=%d nr_migrated=%lu nr_reclaimed=%lu nr_mapped=%lu",
338-
__entry->start,
339-
__entry->end,
340-
__entry->alloc_flags,
341-
__entry->nr_migrated,
342-
__entry->nr_reclaimed,
343-
__entry->nr_mapped)
344-
);
345-
#endif
346-
347307
TRACE_EVENT(mm_setup_per_zone_wmarks,
348308

349309
TP_PROTO(struct zone *zone),

mm/page_alloc.c

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6694,14 +6694,9 @@ static void alloc_contig_dump_pages(struct list_head *page_list)
66946694
}
66956695
}
66966696

6697-
/*
6698-
* [start, end) must belong to a single zone.
6699-
* @alloc_flags: using acr_flags_t to filter the type of migration in
6700-
* trace_mm_alloc_contig_migrate_range_info.
6701-
*/
6697+
/* [start, end) must belong to a single zone. */
67026698
static int __alloc_contig_migrate_range(struct compact_control *cc,
6703-
unsigned long start, unsigned long end,
6704-
acr_flags_t alloc_flags)
6699+
unsigned long start, unsigned long end)
67056700
{
67066701
/* This function is based on compact_zone() from compaction.c. */
67076702
unsigned int nr_reclaimed;
@@ -6713,10 +6708,6 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
67136708
.gfp_mask = cc->gfp_mask,
67146709
.reason = MR_CONTIG_RANGE,
67156710
};
6716-
struct page *page;
6717-
unsigned long total_mapped = 0;
6718-
unsigned long total_migrated = 0;
6719-
unsigned long total_reclaimed = 0;
67206711

67216712
lru_cache_disable();
67226713

@@ -6742,22 +6733,9 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
67426733
&cc->migratepages);
67436734
cc->nr_migratepages -= nr_reclaimed;
67446735

6745-
if (trace_mm_alloc_contig_migrate_range_info_enabled()) {
6746-
total_reclaimed += nr_reclaimed;
6747-
list_for_each_entry(page, &cc->migratepages, lru) {
6748-
struct folio *folio = page_folio(page);
6749-
6750-
total_mapped += folio_mapped(folio) *
6751-
folio_nr_pages(folio);
6752-
}
6753-
}
6754-
67556736
ret = migrate_pages(&cc->migratepages, alloc_migration_target,
67566737
NULL, (unsigned long)&mtc, cc->mode, MR_CONTIG_RANGE, NULL);
67576738

6758-
if (trace_mm_alloc_contig_migrate_range_info_enabled() && !ret)
6759-
total_migrated += cc->nr_migratepages;
6760-
67616739
/*
67626740
* On -ENOMEM, migrate_pages() bails out right away. It is pointless
67636741
* to retry again over this error, so do the same here.
@@ -6773,10 +6751,6 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
67736751
putback_movable_pages(&cc->migratepages);
67746752
}
67756753

6776-
trace_mm_alloc_contig_migrate_range_info(start, end, alloc_flags,
6777-
total_migrated,
6778-
total_reclaimed,
6779-
total_mapped);
67806754
return (ret < 0) ? ret : 0;
67816755
}
67826756

@@ -6921,7 +6895,7 @@ int alloc_contig_range_noprof(unsigned long start, unsigned long end,
69216895
* allocated. So, if we fall through be sure to clear ret so that
69226896
* -EBUSY is not accidentally used or returned to caller.
69236897
*/
6924-
ret = __alloc_contig_migrate_range(&cc, start, end, alloc_flags);
6898+
ret = __alloc_contig_migrate_range(&cc, start, end);
69256899
if (ret && ret != -EBUSY)
69266900
goto done;
69276901

0 commit comments

Comments
 (0)