* [PATCH] mmap: Remove unused events vma_mas_szero and vma_store
@ 2025-06-05 20:19 Steven Rostedt
2025-06-05 20:31 ` Sidhartha Kumar
2025-06-05 20:49 ` Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: Steven Rostedt @ 2025-06-05 20:19 UTC (permalink / raw)
To: LKML, Linux Trace Kernel, linux-mm
Cc: Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton,
Liam R. Howlett, Lorenzo Stoakes, Vlastimil Babka, Jann Horn
From: Steven Rostedt <rostedt@goodmis.org>
When the __vma_adjust() was converted to use the vma iterator it removed
the functions vma_mas_store() and vma_mas_remove(). These functions called
the tracepoints trace_vma_mas_store() and trace_vma_mas_szero()
respectively. The calls to these tracepoints were removed but the trace
events that created the tracepoints were not removed. Each trace event can
take up to 5K of memory, and it is allocated regardless of if they are
called or not.
Remove the unused trace events.
Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/
Fixes: fbcc3104b843 ("mmap: convert __vma_adjust() to use vma iterator")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
include/trace/events/mmap.h | 52 -------------------------------------
1 file changed, 52 deletions(-)
diff --git a/include/trace/events/mmap.h b/include/trace/events/mmap.h
index f8d61485de16..ee2843a5daef 100644
--- a/include/trace/events/mmap.h
+++ b/include/trace/events/mmap.h
@@ -43,58 +43,6 @@ TRACE_EVENT(vm_unmapped_area,
__entry->align_offset)
);
-TRACE_EVENT(vma_mas_szero,
- TP_PROTO(struct maple_tree *mt, unsigned long start,
- unsigned long end),
-
- TP_ARGS(mt, start, end),
-
- TP_STRUCT__entry(
- __field(struct maple_tree *, mt)
- __field(unsigned long, start)
- __field(unsigned long, end)
- ),
-
- TP_fast_assign(
- __entry->mt = mt;
- __entry->start = start;
- __entry->end = end;
- ),
-
- TP_printk("mt_mod %p, (NULL), SNULL, %lu, %lu,",
- __entry->mt,
- (unsigned long) __entry->start,
- (unsigned long) __entry->end
- )
-);
-
-TRACE_EVENT(vma_store,
- TP_PROTO(struct maple_tree *mt, struct vm_area_struct *vma),
-
- TP_ARGS(mt, vma),
-
- TP_STRUCT__entry(
- __field(struct maple_tree *, mt)
- __field(struct vm_area_struct *, vma)
- __field(unsigned long, vm_start)
- __field(unsigned long, vm_end)
- ),
-
- TP_fast_assign(
- __entry->mt = mt;
- __entry->vma = vma;
- __entry->vm_start = vma->vm_start;
- __entry->vm_end = vma->vm_end - 1;
- ),
-
- TP_printk("mt_mod %p, (%p), STORE, %lu, %lu,",
- __entry->mt, __entry->vma,
- (unsigned long) __entry->vm_start,
- (unsigned long) __entry->vm_end
- )
-);
-
-
TRACE_EVENT(exit_mmap,
TP_PROTO(struct mm_struct *mm),
--
2.47.2
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mmap: Remove unused events vma_mas_szero and vma_store
2025-06-05 20:19 [PATCH] mmap: Remove unused events vma_mas_szero and vma_store Steven Rostedt
@ 2025-06-05 20:31 ` Sidhartha Kumar
2025-06-05 20:49 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Sidhartha Kumar @ 2025-06-05 20:31 UTC (permalink / raw)
To: Steven Rostedt, LKML, Linux Trace Kernel, linux-mm
Cc: Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton,
Liam R. Howlett, Lorenzo Stoakes, Vlastimil Babka, Jann Horn
On 6/5/25 4:19 PM, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> When the __vma_adjust() was converted to use the vma iterator it removed
> the functions vma_mas_store() and vma_mas_remove(). These functions called
> the tracepoints trace_vma_mas_store() and trace_vma_mas_szero()
> respectively. The calls to these tracepoints were removed but the trace
> events that created the tracepoints were not removed. Each trace event can
> take up to 5K of memory, and it is allocated regardless of if they are
> called or not.
>
> Remove the unused trace events.
>
> Link: https://lore.kernel.org/all/20250529130138.544ffec4@gandalf.local.home/
>
> Fixes: fbcc3104b843 ("mmap: convert __vma_adjust() to use vma iterator")
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
> ---
> include/trace/events/mmap.h | 52 -------------------------------------
> 1 file changed, 52 deletions(-)
>
> diff --git a/include/trace/events/mmap.h b/include/trace/events/mmap.h
> index f8d61485de16..ee2843a5daef 100644
> --- a/include/trace/events/mmap.h
> +++ b/include/trace/events/mmap.h
> @@ -43,58 +43,6 @@ TRACE_EVENT(vm_unmapped_area,
> __entry->align_offset)
> );
>
> -TRACE_EVENT(vma_mas_szero,
> - TP_PROTO(struct maple_tree *mt, unsigned long start,
> - unsigned long end),
> -
> - TP_ARGS(mt, start, end),
> -
> - TP_STRUCT__entry(
> - __field(struct maple_tree *, mt)
> - __field(unsigned long, start)
> - __field(unsigned long, end)
> - ),
> -
> - TP_fast_assign(
> - __entry->mt = mt;
> - __entry->start = start;
> - __entry->end = end;
> - ),
> -
> - TP_printk("mt_mod %p, (NULL), SNULL, %lu, %lu,",
> - __entry->mt,
> - (unsigned long) __entry->start,
> - (unsigned long) __entry->end
> - )
> -);
> -
> -TRACE_EVENT(vma_store,
> - TP_PROTO(struct maple_tree *mt, struct vm_area_struct *vma),
> -
> - TP_ARGS(mt, vma),
> -
> - TP_STRUCT__entry(
> - __field(struct maple_tree *, mt)
> - __field(struct vm_area_struct *, vma)
> - __field(unsigned long, vm_start)
> - __field(unsigned long, vm_end)
> - ),
> -
> - TP_fast_assign(
> - __entry->mt = mt;
> - __entry->vma = vma;
> - __entry->vm_start = vma->vm_start;
> - __entry->vm_end = vma->vm_end - 1;
> - ),
> -
> - TP_printk("mt_mod %p, (%p), STORE, %lu, %lu,",
> - __entry->mt, __entry->vma,
> - (unsigned long) __entry->vm_start,
> - (unsigned long) __entry->vm_end
> - )
> -);
> -
> -
> TRACE_EVENT(exit_mmap,
> TP_PROTO(struct mm_struct *mm),
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mmap: Remove unused events vma_mas_szero and vma_store
2025-06-05 20:19 [PATCH] mmap: Remove unused events vma_mas_szero and vma_store Steven Rostedt
2025-06-05 20:31 ` Sidhartha Kumar
@ 2025-06-05 20:49 ` Andrew Morton
2025-06-05 20:56 ` Steven Rostedt
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2025-06-05 20:49 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Linux Trace Kernel, linux-mm, Masami Hiramatsu,
Mathieu Desnoyers, Liam R. Howlett, Lorenzo Stoakes,
Vlastimil Babka, Jann Horn
On Thu, 5 Jun 2025 16:19:59 -0400 Steven Rostedt <rostedt@goodmis.org> wrote:
> When the __vma_adjust() was converted to use the vma iterator it removed
> the functions vma_mas_store() and vma_mas_remove(). These functions called
> the tracepoints trace_vma_mas_store() and trace_vma_mas_szero()
> respectively. The calls to these tracepoints were removed but the trace
> events that created the tracepoints were not removed. Each trace event can
> take up to 5K of memory, and it is allocated regardless of if they are
> called or not.
Thanks. mm.git has an identical patch from Caleb Mateos
(https://lkml.kernel.org/r/20250411161746.1043239-1-csander@purestorage.com)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmap: Remove unused events vma_mas_szero and vma_store
2025-06-05 20:49 ` Andrew Morton
@ 2025-06-05 20:56 ` Steven Rostedt
0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2025-06-05 20:56 UTC (permalink / raw)
To: Andrew Morton
Cc: LKML, Linux Trace Kernel, linux-mm, Masami Hiramatsu,
Mathieu Desnoyers, Liam R. Howlett, Lorenzo Stoakes,
Vlastimil Babka, Jann Horn
On Thu, 5 Jun 2025 13:49:10 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Thu, 5 Jun 2025 16:19:59 -0400 Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > When the __vma_adjust() was converted to use the vma iterator it removed
> > the functions vma_mas_store() and vma_mas_remove(). These functions called
> > the tracepoints trace_vma_mas_store() and trace_vma_mas_szero()
> > respectively. The calls to these tracepoints were removed but the trace
> > events that created the tracepoints were not removed. Each trace event can
> > take up to 5K of memory, and it is allocated regardless of if they are
> > called or not.
>
> Thanks. mm.git has an identical patch from Caleb Mateos
> (https://lkml.kernel.org/r/20250411161746.1043239-1-csander@purestorage.com)
Bah, that's why I didn't send it out. I just noticed it in my queue. I
forgot to delete it.
I even replied that I was going to send this and found out that it's the
patch that started everything.
Feel free to ignore. Sorry for the noise ;-)
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-05 20:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-05 20:19 [PATCH] mmap: Remove unused events vma_mas_szero and vma_store Steven Rostedt
2025-06-05 20:31 ` Sidhartha Kumar
2025-06-05 20:49 ` Andrew Morton
2025-06-05 20:56 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox