* [PATCH] mm/page_alloc: remove trace_mm_alloc_contig_migrate_range_info()
@ 2025-07-22 19:46 Zi Yan
2025-07-22 19:50 ` David Hildenbrand
2025-07-23 9:24 ` Vlastimil Babka
0 siblings, 2 replies; 3+ messages in thread
From: Zi Yan @ 2025-07-22 19:46 UTC (permalink / raw)
To: Richard Chang, linux-mm
Cc: Andrew Morton, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, Brendan Jackman, Johannes Weiner, Zi Yan,
David Rientjes, Martin Liu, David Hildenbrand, linux-kernel,
linux-trace-kernel, kernel test robot
The trace event has not recorded the right data since it was introduced
at commit c8b360031218 ("mm: add alloc_contig_migrate_range allocation
statistics"). Remove it.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202507220742.P3SaKlI6-lkp@intel.com/
Signed-off-by: Zi Yan <ziy@nvidia.com>
---
include/trace/events/kmem.h | 40 -------------------------------------
mm/page_alloc.c | 32 +++--------------------------
2 files changed, 3 insertions(+), 69 deletions(-)
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
index efffcf578217..474358773abe 100644
--- a/include/trace/events/kmem.h
+++ b/include/trace/events/kmem.h
@@ -304,46 +304,6 @@ TRACE_EVENT(mm_page_alloc_extfrag,
__entry->change_ownership)
);
-#ifdef CONFIG_CONTIG_ALLOC
-TRACE_EVENT(mm_alloc_contig_migrate_range_info,
-
- TP_PROTO(unsigned long start,
- unsigned long end,
- unsigned long nr_migrated,
- unsigned long nr_reclaimed,
- unsigned long nr_mapped,
- acr_flags_t alloc_flags),
-
- TP_ARGS(start, end, nr_migrated, nr_reclaimed, nr_mapped, alloc_flags),
-
- TP_STRUCT__entry(
- __field(unsigned long, start)
- __field(unsigned long, end)
- __field(unsigned long, nr_migrated)
- __field(unsigned long, nr_reclaimed)
- __field(unsigned long, nr_mapped)
- __field(acr_flags_t, alloc_flags)
- ),
-
- TP_fast_assign(
- __entry->start = start;
- __entry->end = end;
- __entry->nr_migrated = nr_migrated;
- __entry->nr_reclaimed = nr_reclaimed;
- __entry->nr_mapped = nr_mapped;
- __entry->alloc_flags = alloc_flags;
- ),
-
- TP_printk("start=0x%lx end=0x%lx alloc_flags=%d nr_migrated=%lu nr_reclaimed=%lu nr_mapped=%lu",
- __entry->start,
- __entry->end,
- __entry->alloc_flags,
- __entry->nr_migrated,
- __entry->nr_reclaimed,
- __entry->nr_mapped)
-);
-#endif
-
TRACE_EVENT(mm_setup_per_zone_wmarks,
TP_PROTO(struct zone *zone),
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 78ddf1d43c6c..a98c5d1f4336 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6694,14 +6694,9 @@ static void alloc_contig_dump_pages(struct list_head *page_list)
}
}
-/*
- * [start, end) must belong to a single zone.
- * @alloc_flags: using acr_flags_t to filter the type of migration in
- * trace_mm_alloc_contig_migrate_range_info.
- */
+/* [start, end) must belong to a single zone. */
static int __alloc_contig_migrate_range(struct compact_control *cc,
- unsigned long start, unsigned long end,
- acr_flags_t alloc_flags)
+ unsigned long start, unsigned long end)
{
/* This function is based on compact_zone() from compaction.c. */
unsigned int nr_reclaimed;
@@ -6713,10 +6708,6 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
.gfp_mask = cc->gfp_mask,
.reason = MR_CONTIG_RANGE,
};
- struct page *page;
- unsigned long total_mapped = 0;
- unsigned long total_migrated = 0;
- unsigned long total_reclaimed = 0;
lru_cache_disable();
@@ -6742,22 +6733,9 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
&cc->migratepages);
cc->nr_migratepages -= nr_reclaimed;
- if (trace_mm_alloc_contig_migrate_range_info_enabled()) {
- total_reclaimed += nr_reclaimed;
- list_for_each_entry(page, &cc->migratepages, lru) {
- struct folio *folio = page_folio(page);
-
- total_mapped += folio_mapped(folio) *
- folio_nr_pages(folio);
- }
- }
-
ret = migrate_pages(&cc->migratepages, alloc_migration_target,
NULL, (unsigned long)&mtc, cc->mode, MR_CONTIG_RANGE, NULL);
- if (trace_mm_alloc_contig_migrate_range_info_enabled() && !ret)
- total_migrated += cc->nr_migratepages;
-
/*
* On -ENOMEM, migrate_pages() bails out right away. It is pointless
* 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,
putback_movable_pages(&cc->migratepages);
}
- trace_mm_alloc_contig_migrate_range_info(start, end, alloc_flags,
- total_migrated,
- total_reclaimed,
- total_mapped);
return (ret < 0) ? ret : 0;
}
@@ -6921,7 +6895,7 @@ int alloc_contig_range_noprof(unsigned long start, unsigned long end,
* allocated. So, if we fall through be sure to clear ret so that
* -EBUSY is not accidentally used or returned to caller.
*/
- ret = __alloc_contig_migrate_range(&cc, start, end, alloc_flags);
+ ret = __alloc_contig_migrate_range(&cc, start, end);
if (ret && ret != -EBUSY)
goto done;
--
2.47.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/page_alloc: remove trace_mm_alloc_contig_migrate_range_info()
2025-07-22 19:46 [PATCH] mm/page_alloc: remove trace_mm_alloc_contig_migrate_range_info() Zi Yan
@ 2025-07-22 19:50 ` David Hildenbrand
2025-07-23 9:24 ` Vlastimil Babka
1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2025-07-22 19:50 UTC (permalink / raw)
To: Zi Yan, Richard Chang, linux-mm
Cc: Andrew Morton, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, Brendan Jackman, Johannes Weiner, David Rientjes,
Martin Liu, linux-kernel, linux-trace-kernel, kernel test robot
On 22.07.25 21:46, Zi Yan wrote:
> The trace event has not recorded the right data since it was introduced
> at commit c8b360031218 ("mm: add alloc_contig_migrate_range allocation
> statistics"). Remove it.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202507220742.P3SaKlI6-lkp@intel.com/
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> ---
Yeah, right call IMHO
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/page_alloc: remove trace_mm_alloc_contig_migrate_range_info()
2025-07-22 19:46 [PATCH] mm/page_alloc: remove trace_mm_alloc_contig_migrate_range_info() Zi Yan
2025-07-22 19:50 ` David Hildenbrand
@ 2025-07-23 9:24 ` Vlastimil Babka
1 sibling, 0 replies; 3+ messages in thread
From: Vlastimil Babka @ 2025-07-23 9:24 UTC (permalink / raw)
To: Zi Yan, Richard Chang, linux-mm
Cc: Andrew Morton, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Suren Baghdasaryan, Michal Hocko,
Brendan Jackman, Johannes Weiner, David Rientjes, Martin Liu,
David Hildenbrand, linux-kernel, linux-trace-kernel,
kernel test robot
On 7/22/25 21:46, Zi Yan wrote:
> The trace event has not recorded the right data since it was introduced
> at commit c8b360031218 ("mm: add alloc_contig_migrate_range allocation
> statistics"). Remove it.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202507220742.P3SaKlI6-lkp@intel.com/
> Signed-off-by: Zi Yan <ziy@nvidia.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-23 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 19:46 [PATCH] mm/page_alloc: remove trace_mm_alloc_contig_migrate_range_info() Zi Yan
2025-07-22 19:50 ` David Hildenbrand
2025-07-23 9:24 ` Vlastimil Babka
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).