linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64
@ 2025-06-12 14:12 Steven Rostedt
  2025-07-24 13:28 ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2025-06-12 14:12 UTC (permalink / raw)
  To: LKML, Linux trace kernel, linux-mm
  Cc: Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton,
	David Hildenbrand, Madhavan Srinivasan, Michael Ellerman

From: Steven Rostedt <rostedt@goodmis.org>

The events hugepage_set_pmd, hugepage_set_pud, hugepage_update_pmd and
hugepage_update_pud are only called when CONFIG_PPC_BOOK3S_64 is defined.
As each event can take up to 5K regardless if they are used or not, it's
best not to define them when they are not used. Add #ifdef around these
events when they are not used.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Note, I will be adding code soon that will make unused events cause a warning.

 include/trace/events/thp.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/trace/events/thp.h b/include/trace/events/thp.h
index f50048af5fcc..c8fe879d5828 100644
--- a/include/trace/events/thp.h
+++ b/include/trace/events/thp.h
@@ -8,6 +8,7 @@
 #include <linux/types.h>
 #include <linux/tracepoint.h>
 
+#ifdef CONFIG_PPC_BOOK3S_64
 DECLARE_EVENT_CLASS(hugepage_set,
 
 	    TP_PROTO(unsigned long addr, unsigned long pte),
@@ -66,6 +67,7 @@ DEFINE_EVENT(hugepage_update, hugepage_update_pud,
 	    TP_PROTO(unsigned long addr, unsigned long pud, unsigned long clr, unsigned long set),
 	    TP_ARGS(addr, pud, clr, set)
 );
+#endif /* CONFIG_PPC_BOOK3S_64 */
 
 DECLARE_EVENT_CLASS(migration_pmd,
 
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64
  2025-06-12 14:12 [PATCH] powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64 Steven Rostedt
@ 2025-07-24 13:28 ` Steven Rostedt
  2025-07-24 16:13   ` David Hildenbrand
  2025-07-25  3:15   ` Madhavan Srinivasan
  0 siblings, 2 replies; 4+ messages in thread
From: Steven Rostedt @ 2025-07-24 13:28 UTC (permalink / raw)
  To: LKML, Linux trace kernel, linux-mm
  Cc: Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton,
	David Hildenbrand, Madhavan Srinivasan, Michael Ellerman


Anyone have any issues with this patch? Should I take it in my tree?

-- Steve


On Thu, 12 Jun 2025 10:12:59 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: Steven Rostedt <rostedt@goodmis.org>
> 
> The events hugepage_set_pmd, hugepage_set_pud, hugepage_update_pmd and
> hugepage_update_pud are only called when CONFIG_PPC_BOOK3S_64 is defined.
> As each event can take up to 5K regardless if they are used or not, it's
> best not to define them when they are not used. Add #ifdef around these
> events when they are not used.
> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> Note, I will be adding code soon that will make unused events cause a warning.
> 
>  include/trace/events/thp.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/trace/events/thp.h b/include/trace/events/thp.h
> index f50048af5fcc..c8fe879d5828 100644
> --- a/include/trace/events/thp.h
> +++ b/include/trace/events/thp.h
> @@ -8,6 +8,7 @@
>  #include <linux/types.h>
>  #include <linux/tracepoint.h>
>  
> +#ifdef CONFIG_PPC_BOOK3S_64
>  DECLARE_EVENT_CLASS(hugepage_set,
>  
>  	    TP_PROTO(unsigned long addr, unsigned long pte),
> @@ -66,6 +67,7 @@ DEFINE_EVENT(hugepage_update, hugepage_update_pud,
>  	    TP_PROTO(unsigned long addr, unsigned long pud, unsigned long clr, unsigned long set),
>  	    TP_ARGS(addr, pud, clr, set)

>  );
> +#endif /* CONFIG_PPC_BOOK3S_64 */
>  
>  DECLARE_EVENT_CLASS(migration_pmd,
>  



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64
  2025-07-24 13:28 ` Steven Rostedt
@ 2025-07-24 16:13   ` David Hildenbrand
  2025-07-25  3:15   ` Madhavan Srinivasan
  1 sibling, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2025-07-24 16:13 UTC (permalink / raw)
  To: Steven Rostedt, LKML, Linux trace kernel, linux-mm
  Cc: Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton,
	Madhavan Srinivasan, Michael Ellerman

On 24.07.25 15:28, Steven Rostedt wrote:
> 
> Anyone have any issues with this patch? Should I take it in my tree?
> 

Huh, I was CCed on the patch but cannot find it in my inbox.

If it compiles, all good:

Acked-by: David Hildenbrand <david@redhat.com>

> -- Steve
> 
> 
> On Thu, 12 Jun 2025 10:12:59 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
>> From: Steven Rostedt <rostedt@goodmis.org>
>>
>> The events hugepage_set_pmd, hugepage_set_pud, hugepage_update_pmd and
>> hugepage_update_pud are only called when CONFIG_PPC_BOOK3S_64 is defined.
>> As each event can take up to 5K regardless if they are used or not, it's
>> best not to define them when they are not used. Add #ifdef around these
>> events when they are not used.
>>
>> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>> ---
>> Note, I will be adding code soon that will make unused events cause a warning.
>>
>>   include/trace/events/thp.h | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/include/trace/events/thp.h b/include/trace/events/thp.h
>> index f50048af5fcc..c8fe879d5828 100644
>> --- a/include/trace/events/thp.h
>> +++ b/include/trace/events/thp.h
>> @@ -8,6 +8,7 @@
>>   #include <linux/types.h>
>>   #include <linux/tracepoint.h>
>>   
>> +#ifdef CONFIG_PPC_BOOK3S_64
>>   DECLARE_EVENT_CLASS(hugepage_set,
>>   
>>   	    TP_PROTO(unsigned long addr, unsigned long pte),
>> @@ -66,6 +67,7 @@ DEFINE_EVENT(hugepage_update, hugepage_update_pud,
>>   	    TP_PROTO(unsigned long addr, unsigned long pud, unsigned long clr, unsigned long set),
>>   	    TP_ARGS(addr, pud, clr, set)
> 
>>   );
>> +#endif /* CONFIG_PPC_BOOK3S_64 */
>>   
>>   DECLARE_EVENT_CLASS(migration_pmd,
>>   
> 


-- 
Cheers,

David / dhildenb



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64
  2025-07-24 13:28 ` Steven Rostedt
  2025-07-24 16:13   ` David Hildenbrand
@ 2025-07-25  3:15   ` Madhavan Srinivasan
  1 sibling, 0 replies; 4+ messages in thread
From: Madhavan Srinivasan @ 2025-07-25  3:15 UTC (permalink / raw)
  To: Steven Rostedt, LKML, Linux trace kernel, linux-mm
  Cc: Masami Hiramatsu, Mathieu Desnoyers, Andrew Morton,
	David Hildenbrand, Michael Ellerman



On 7/24/25 6:58 PM, Steven Rostedt wrote:
> 
> Anyone have any issues with this patch? Should I take it in my tree?
> 
> -- Steve
> 
> 

Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>

Yes, kindly take it via your tree 

Thanks
Maddy

> On Thu, 12 Jun 2025 10:12:59 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
>> From: Steven Rostedt <rostedt@goodmis.org>
>>
>> The events hugepage_set_pmd, hugepage_set_pud, hugepage_update_pmd and
>> hugepage_update_pud are only called when CONFIG_PPC_BOOK3S_64 is defined.
>> As each event can take up to 5K regardless if they are used or not, it's
>> best not to define them when they are not used. Add #ifdef around these
>> events when they are not used.
>>
>> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>> ---
>> Note, I will be adding code soon that will make unused events cause a warning.
>>
>>  include/trace/events/thp.h | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/include/trace/events/thp.h b/include/trace/events/thp.h
>> index f50048af5fcc..c8fe879d5828 100644
>> --- a/include/trace/events/thp.h
>> +++ b/include/trace/events/thp.h
>> @@ -8,6 +8,7 @@
>>  #include <linux/types.h>
>>  #include <linux/tracepoint.h>
>>  
>> +#ifdef CONFIG_PPC_BOOK3S_64
>>  DECLARE_EVENT_CLASS(hugepage_set,
>>  
>>  	    TP_PROTO(unsigned long addr, unsigned long pte),
>> @@ -66,6 +67,7 @@ DEFINE_EVENT(hugepage_update, hugepage_update_pud,
>>  	    TP_PROTO(unsigned long addr, unsigned long pud, unsigned long clr, unsigned long set),
>>  	    TP_ARGS(addr, pud, clr, set)
> 
>>  );
>> +#endif /* CONFIG_PPC_BOOK3S_64 */
>>  
>>  DECLARE_EVENT_CLASS(migration_pmd,
>>  
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-25  3:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-12 14:12 [PATCH] powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64 Steven Rostedt
2025-07-24 13:28 ` Steven Rostedt
2025-07-24 16:13   ` David Hildenbrand
2025-07-25  3:15   ` Madhavan Srinivasan

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).