* [PATCH v2 0/2] x86, mm: minor tlb_flush tracepoint adjustments
@ 2025-12-12 9:08 Tal Zussman
2025-12-12 9:08 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Tal Zussman
2025-12-12 9:08 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Tal Zussman
0 siblings, 2 replies; 11+ messages in thread
From: Tal Zussman @ 2025-12-12 9:08 UTC (permalink / raw)
To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Ingo Molnar,
Rik van Riel, Andrew Morton, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
x86, Will Deacon, Aneesh Kumar K.V, Nick Piggin, Peter Zijlstra,
David Hildenbrand
Cc: linux-kernel, linux-trace-kernel, linux-mm, linux-arch,
Tal Zussman, David Hildenbrand
One minor fix and one minor cleanup related to the tlb_flush tracepoint.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
Changes in v2:
- Propagated tags (thanks David, Rik, Steven!)
- Added MMU Gather maintainers to recipients
- Rebased on master
- Link to v1: https://lore.kernel.org/r/20250528-tlb-trace-fix-v1-0-2e94c58f450d@columbia.edu
---
Tal Zussman (2):
x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum
mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS
include/linux/mm_types.h | 1 -
include/trace/events/tlb.h | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: d358e5254674b70f34c847715ca509e46eb81e6f
change-id: 20250528-tlb-trace-fix-eb9b6fc7bb26
Best regards,
--
Tal Zussman <tz2294@columbia.edu>
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum 2025-12-12 9:08 [PATCH v2 0/2] x86, mm: minor tlb_flush tracepoint adjustments Tal Zussman @ 2025-12-12 9:08 ` Tal Zussman 2025-12-12 9:23 ` [tip: x86/urgent] x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> tip-bot2 for Tal Zussman ` (2 more replies) 2025-12-12 9:08 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Tal Zussman 1 sibling, 3 replies; 11+ messages in thread From: Tal Zussman @ 2025-12-12 9:08 UTC (permalink / raw) To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Ingo Molnar, Rik van Riel, Andrew Morton, Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, x86, Will Deacon, Aneesh Kumar K.V, Nick Piggin, Peter Zijlstra, David Hildenbrand Cc: linux-kernel, linux-trace-kernel, linux-mm, linux-arch, Tal Zussman, David Hildenbrand When the TLB_REMOTE_WRONG_CPU enum was introduced for the tlb_flush tracepoint, the enum was not exported to userspace. Add it to the appropriate macro definition to enable parsing by userspace tools, as per [0]. [0] Link: https://lore.kernel.org/all/20150403013802.220157513@goodmis.org Fixes: 2815a56e4b72 ("x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU") Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Rik van Riel <riel@surriel.com> Signed-off-by: Tal Zussman <tz2294@columbia.edu> --- include/trace/events/tlb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h index b4d8e7dc38f8..725a75720a23 100644 --- a/include/trace/events/tlb.h +++ b/include/trace/events/tlb.h @@ -13,7 +13,8 @@ EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \ EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \ EM( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" ) \ - EMe( TLB_REMOTE_SEND_IPI, "remote ipi send" ) + EM( TLB_REMOTE_SEND_IPI, "remote ipi send" ) \ + EMe( TLB_REMOTE_WRONG_CPU, "remote wrong CPU" ) /* * First define the enums in TLB_FLUSH_REASON to be exported to userspace -- 2.39.5 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [tip: x86/urgent] x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> 2025-12-12 9:08 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Tal Zussman @ 2025-12-12 9:23 ` tip-bot2 for Tal Zussman 2025-12-13 10:07 ` tip-bot2 for Tal Zussman 2025-12-15 12:39 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Lorenzo Stoakes 2 siblings, 0 replies; 11+ messages in thread From: tip-bot2 for Tal Zussman @ 2025-12-12 9:23 UTC (permalink / raw) To: linux-tip-commits Cc: Tal Zussman, Ingo Molnar, Steven Rostedt (Google), David Hildenbrand, Rik van Riel, x86, linux-kernel The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 2d130eeeaff6c7129b443d12009f405cc98de86e Gitweb: https://git.kernel.org/tip/2d130eeeaff6c7129b443d12009f405cc98de86e Author: Tal Zussman <tz2294@columbia.edu> AuthorDate: Fri, 12 Dec 2025 04:08:07 -05:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Fri, 12 Dec 2025 10:18:14 +01:00 x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> When the TLB_REMOTE_WRONG_CPU enum was introduced for the tlb_flush tracepoint, the enum was not exported to user-space. Add it to the appropriate macro definition to enable parsing by userspace tools, as per: Link: https://lore.kernel.org/all/20150403013802.220157513@goodmis.org [ mingo: Capitalize IPI, etc. ] Fixes: 2815a56e4b72 ("x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU") Signed-off-by: Tal Zussman <tz2294@columbia.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Rik van Riel <riel@surriel.com> Link: https://patch.msgid.link/20251212-tlb-trace-fix-v2-1-d322e0ad9b69@columbia.edu --- include/trace/events/tlb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h index b4d8e7d..fb83695 100644 --- a/include/trace/events/tlb.h +++ b/include/trace/events/tlb.h @@ -12,8 +12,9 @@ EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \ EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \ EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \ - EM( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" ) \ - EMe( TLB_REMOTE_SEND_IPI, "remote ipi send" ) + EM( TLB_LOCAL_MM_SHOOTDOWN, "local MM shootdown" ) \ + EM( TLB_REMOTE_SEND_IPI, "remote IPI send" ) \ + EMe( TLB_REMOTE_WRONG_CPU, "remote wrong CPU" ) /* * First define the enums in TLB_FLUSH_REASON to be exported to userspace ^ permalink raw reply [flat|nested] 11+ messages in thread
* [tip: x86/urgent] x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> 2025-12-12 9:08 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Tal Zussman 2025-12-12 9:23 ` [tip: x86/urgent] x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> tip-bot2 for Tal Zussman @ 2025-12-13 10:07 ` tip-bot2 for Tal Zussman 2025-12-15 12:39 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Lorenzo Stoakes 2 siblings, 0 replies; 11+ messages in thread From: tip-bot2 for Tal Zussman @ 2025-12-13 10:07 UTC (permalink / raw) To: linux-tip-commits Cc: Tal Zussman, Ingo Molnar, Steven Rostedt (Google), David Hildenbrand, Rik van Riel, x86, linux-kernel The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 8b62e64e6d30fa047b3aefb1a36e1f80c8acb3d2 Gitweb: https://git.kernel.org/tip/8b62e64e6d30fa047b3aefb1a36e1f80c8acb3d2 Author: Tal Zussman <tz2294@columbia.edu> AuthorDate: Fri, 12 Dec 2025 04:08:07 -05:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Sat, 13 Dec 2025 11:01:16 +01:00 x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> When the TLB_REMOTE_WRONG_CPU enum was introduced for the tlb_flush tracepoint, the enum was not exported to user-space. Add it to the appropriate macro definition to enable parsing by userspace tools, as per: Link: https://lore.kernel.org/all/20150403013802.220157513@goodmis.org [ mingo: Capitalize IPI, etc. ] Fixes: 2815a56e4b72 ("x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU") Signed-off-by: Tal Zussman <tz2294@columbia.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Rik van Riel <riel@surriel.com> Link: https://patch.msgid.link/20251212-tlb-trace-fix-v2-1-d322e0ad9b69@columbia.edu --- include/trace/events/tlb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h index b4d8e7d..fb83695 100644 --- a/include/trace/events/tlb.h +++ b/include/trace/events/tlb.h @@ -12,8 +12,9 @@ EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \ EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \ EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \ - EM( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" ) \ - EMe( TLB_REMOTE_SEND_IPI, "remote ipi send" ) + EM( TLB_LOCAL_MM_SHOOTDOWN, "local MM shootdown" ) \ + EM( TLB_REMOTE_SEND_IPI, "remote IPI send" ) \ + EMe( TLB_REMOTE_WRONG_CPU, "remote wrong CPU" ) /* * First define the enums in TLB_FLUSH_REASON to be exported to userspace ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum 2025-12-12 9:08 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Tal Zussman 2025-12-12 9:23 ` [tip: x86/urgent] x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> tip-bot2 for Tal Zussman 2025-12-13 10:07 ` tip-bot2 for Tal Zussman @ 2025-12-15 12:39 ` Lorenzo Stoakes 2 siblings, 0 replies; 11+ messages in thread From: Lorenzo Stoakes @ 2025-12-15 12:39 UTC (permalink / raw) To: Tal Zussman Cc: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Ingo Molnar, Rik van Riel, Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, x86, Will Deacon, Aneesh Kumar K.V, Nick Piggin, Peter Zijlstra, David Hildenbrand, linux-kernel, linux-trace-kernel, linux-mm, linux-arch On Fri, Dec 12, 2025 at 04:08:07AM -0500, Tal Zussman wrote: > When the TLB_REMOTE_WRONG_CPU enum was introduced for the tlb_flush > tracepoint, the enum was not exported to userspace. Add it to the > appropriate macro definition to enable parsing by userspace tools, as > per [0]. > > [0] Link: https://lore.kernel.org/all/20150403013802.220157513@goodmis.org > > Fixes: 2815a56e4b72 ("x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU") > Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> > Reviewed-by: David Hildenbrand <david@redhat.com> > Reviewed-by: Rik van Riel <riel@surriel.com> > Signed-off-by: Tal Zussman <tz2294@columbia.edu> LGTM, so: Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> > --- > include/trace/events/tlb.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h > index b4d8e7dc38f8..725a75720a23 100644 > --- a/include/trace/events/tlb.h > +++ b/include/trace/events/tlb.h > @@ -13,7 +13,8 @@ > EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \ > EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \ > EM( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" ) \ > - EMe( TLB_REMOTE_SEND_IPI, "remote ipi send" ) > + EM( TLB_REMOTE_SEND_IPI, "remote ipi send" ) \ > + EMe( TLB_REMOTE_WRONG_CPU, "remote wrong CPU" ) > > /* > * First define the enums in TLB_FLUSH_REASON to be exported to userspace > > -- > 2.39.5 > ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS 2025-12-12 9:08 [PATCH v2 0/2] x86, mm: minor tlb_flush tracepoint adjustments Tal Zussman 2025-12-12 9:08 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Tal Zussman @ 2025-12-12 9:08 ` Tal Zussman 2025-12-12 9:23 ` [tip: x86/urgent] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> tip-bot2 for Tal Zussman ` (2 more replies) 1 sibling, 3 replies; 11+ messages in thread From: Tal Zussman @ 2025-12-12 9:08 UTC (permalink / raw) To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Ingo Molnar, Rik van Riel, Andrew Morton, Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, x86, Will Deacon, Aneesh Kumar K.V, Nick Piggin, Peter Zijlstra, David Hildenbrand Cc: linux-kernel, linux-trace-kernel, linux-mm, linux-arch, Tal Zussman, David Hildenbrand This has been unused since it was added 11 years ago in commit d17d8f9dedb9 ("x86/mm: Add tracepoints for TLB flushes"). Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Rik van Riel <riel@surriel.com> Signed-off-by: Tal Zussman <tz2294@columbia.edu> --- include/linux/mm_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 9f6de068295d..42af2292951d 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1631,7 +1631,6 @@ enum tlb_flush_reason { TLB_LOCAL_MM_SHOOTDOWN, TLB_REMOTE_SEND_IPI, TLB_REMOTE_WRONG_CPU, - NR_TLB_FLUSH_REASONS, }; /** -- 2.39.5 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [tip: x86/urgent] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> 2025-12-12 9:08 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Tal Zussman @ 2025-12-12 9:23 ` tip-bot2 for Tal Zussman 2025-12-13 10:07 ` tip-bot2 for Tal Zussman 2025-12-15 12:40 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Lorenzo Stoakes 2 siblings, 0 replies; 11+ messages in thread From: tip-bot2 for Tal Zussman @ 2025-12-12 9:23 UTC (permalink / raw) To: linux-tip-commits Cc: Tal Zussman, Ingo Molnar, Rik van Riel, David Hildenbrand, x86, linux-kernel The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 581a8b7b1e1e2ac53d6c150e4b592ae69aeea2e4 Gitweb: https://git.kernel.org/tip/581a8b7b1e1e2ac53d6c150e4b592ae69aeea2e4 Author: Tal Zussman <tz2294@columbia.edu> AuthorDate: Fri, 12 Dec 2025 04:08:08 -05:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Fri, 12 Dec 2025 10:18:21 +01:00 mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> This has been unused since it was added 11 years ago in: d17d8f9dedb9 ("x86/mm: Add tracepoints for TLB flushes") Signed-off-by: Tal Zussman <tz2294@columbia.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Rik van Riel <riel@surriel.com> Acked-by: David Hildenbrand <david@redhat.com> Link: https://patch.msgid.link/20251212-tlb-trace-fix-v2-2-d322e0ad9b69@columbia.edu --- include/linux/mm_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 9f6de06..42af229 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1631,7 +1631,6 @@ enum tlb_flush_reason { TLB_LOCAL_MM_SHOOTDOWN, TLB_REMOTE_SEND_IPI, TLB_REMOTE_WRONG_CPU, - NR_TLB_FLUSH_REASONS, }; /** ^ permalink raw reply [flat|nested] 11+ messages in thread
* [tip: x86/urgent] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> 2025-12-12 9:08 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Tal Zussman 2025-12-12 9:23 ` [tip: x86/urgent] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> tip-bot2 for Tal Zussman @ 2025-12-13 10:07 ` tip-bot2 for Tal Zussman 2025-12-15 12:40 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Lorenzo Stoakes 2 siblings, 0 replies; 11+ messages in thread From: tip-bot2 for Tal Zussman @ 2025-12-13 10:07 UTC (permalink / raw) To: linux-tip-commits Cc: Tal Zussman, Ingo Molnar, Rik van Riel, David Hildenbrand, x86, linux-kernel The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 0c01ea92f545ca7fcafdda6a8e29b65ef3a5ec74 Gitweb: https://git.kernel.org/tip/0c01ea92f545ca7fcafdda6a8e29b65ef3a5ec74 Author: Tal Zussman <tz2294@columbia.edu> AuthorDate: Fri, 12 Dec 2025 04:08:08 -05:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Sat, 13 Dec 2025 11:01:16 +01:00 mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> This has been unused since it was added 11 years ago in: d17d8f9dedb9 ("x86/mm: Add tracepoints for TLB flushes") Signed-off-by: Tal Zussman <tz2294@columbia.edu> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Rik van Riel <riel@surriel.com> Acked-by: David Hildenbrand <david@redhat.com> Link: https://patch.msgid.link/20251212-tlb-trace-fix-v2-2-d322e0ad9b69@columbia.edu --- include/linux/mm_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 9f6de06..42af229 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1631,7 +1631,6 @@ enum tlb_flush_reason { TLB_LOCAL_MM_SHOOTDOWN, TLB_REMOTE_SEND_IPI, TLB_REMOTE_WRONG_CPU, - NR_TLB_FLUSH_REASONS, }; /** ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS 2025-12-12 9:08 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Tal Zussman 2025-12-12 9:23 ` [tip: x86/urgent] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> tip-bot2 for Tal Zussman 2025-12-13 10:07 ` tip-bot2 for Tal Zussman @ 2025-12-15 12:40 ` Lorenzo Stoakes 2025-12-15 13:35 ` Mathieu Desnoyers 2 siblings, 1 reply; 11+ messages in thread From: Lorenzo Stoakes @ 2025-12-15 12:40 UTC (permalink / raw) To: Tal Zussman Cc: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Ingo Molnar, Rik van Riel, Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, x86, Will Deacon, Aneesh Kumar K.V, Nick Piggin, Peter Zijlstra, David Hildenbrand, linux-kernel, linux-trace-kernel, linux-mm, linux-arch On Fri, Dec 12, 2025 at 04:08:08AM -0500, Tal Zussman wrote: > This has been unused since it was added 11 years ago in commit > d17d8f9dedb9 ("x86/mm: Add tracepoints for TLB flushes"). > > Acked-by: David Hildenbrand <david@redhat.com> > Reviewed-by: Rik van Riel <riel@surriel.com> > Signed-off-by: Tal Zussman <tz2294@columbia.edu> Hmm, guess just a way of counting the number of reasons, but if nobody's using it that's silly. So: Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> > --- > include/linux/mm_types.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index 9f6de068295d..42af2292951d 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -1631,7 +1631,6 @@ enum tlb_flush_reason { > TLB_LOCAL_MM_SHOOTDOWN, > TLB_REMOTE_SEND_IPI, > TLB_REMOTE_WRONG_CPU, > - NR_TLB_FLUSH_REASONS, > }; > > /** > > -- > 2.39.5 > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS 2025-12-15 12:40 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Lorenzo Stoakes @ 2025-12-15 13:35 ` Mathieu Desnoyers 2025-12-16 10:32 ` Lorenzo Stoakes 0 siblings, 1 reply; 11+ messages in thread From: Mathieu Desnoyers @ 2025-12-15 13:35 UTC (permalink / raw) To: Lorenzo Stoakes, Tal Zussman, Steven Rostedt Cc: Masami Hiramatsu, Ingo Molnar, Rik van Riel, Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, x86, Will Deacon, Aneesh Kumar K.V, Nick Piggin, Peter Zijlstra, David Hildenbrand, linux-kernel, linux-trace-kernel, linux-mm, linux-arch On 2025-12-15 07:40, Lorenzo Stoakes wrote: > On Fri, Dec 12, 2025 at 04:08:08AM -0500, Tal Zussman wrote: >> This has been unused since it was added 11 years ago in commit >> d17d8f9dedb9 ("x86/mm: Add tracepoints for TLB flushes"). >> >> Acked-by: David Hildenbrand <david@redhat.com> >> Reviewed-by: Rik van Riel <riel@surriel.com> >> Signed-off-by: Tal Zussman <tz2294@columbia.edu> > > Hmm, guess just a way of counting the number of reasons, but if nobody's using > it that's silly. So: If TRACE_DEFINE_ENUM was implemented differently [1,2], then we could use NR_TLB_FLUSH_REASONS in a static assert to validate that the number of exported enum labels matches the enum tlb_flush_reason. This would catch this kind of discrepancy at compile-time. Thanks, Mathieu [1] https://github.com/lttng/lttng-modules/blob/master/include/instrumentation/events/sched.h#L132 [2] https://github.com/lttng/lttng-modules/blob/master/include/lttng/tracepoint-event-impl.h#L176 > -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS 2025-12-15 13:35 ` Mathieu Desnoyers @ 2025-12-16 10:32 ` Lorenzo Stoakes 0 siblings, 0 replies; 11+ messages in thread From: Lorenzo Stoakes @ 2025-12-16 10:32 UTC (permalink / raw) To: Mathieu Desnoyers Cc: Tal Zussman, Steven Rostedt, Masami Hiramatsu, Ingo Molnar, Rik van Riel, Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, x86, Will Deacon, Aneesh Kumar K.V, Nick Piggin, Peter Zijlstra, David Hildenbrand, linux-kernel, linux-trace-kernel, linux-mm, linux-arch On Mon, Dec 15, 2025 at 08:35:58AM -0500, Mathieu Desnoyers wrote: > On 2025-12-15 07:40, Lorenzo Stoakes wrote: > > On Fri, Dec 12, 2025 at 04:08:08AM -0500, Tal Zussman wrote: > > > This has been unused since it was added 11 years ago in commit > > > d17d8f9dedb9 ("x86/mm: Add tracepoints for TLB flushes"). > > > > > > Acked-by: David Hildenbrand <david@redhat.com> > > > Reviewed-by: Rik van Riel <riel@surriel.com> > > > Signed-off-by: Tal Zussman <tz2294@columbia.edu> > > > > Hmm, guess just a way of counting the number of reasons, but if nobody's using > > it that's silly. So: > > If TRACE_DEFINE_ENUM was implemented differently [1,2], then we could use > NR_TLB_FLUSH_REASONS in a static assert to validate that the number of > exported enum labels matches the enum tlb_flush_reason. > > This would catch this kind of discrepancy at compile-time. Sure, but for the time being this isn't being used, so dead code -> yoink! We can obviously come back to this as necessary. > > Thanks, > > Mathieu > > [1] https://github.com/lttng/lttng-modules/blob/master/include/instrumentation/events/sched.h#L132 > [2] https://github.com/lttng/lttng-modules/blob/master/include/lttng/tracepoint-event-impl.h#L176 > > > > -- > Mathieu Desnoyers > EfficiOS Inc. > https://www.efficios.com Cheers, Lorenzo ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-12-16 10:32 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-12-12 9:08 [PATCH v2 0/2] x86, mm: minor tlb_flush tracepoint adjustments Tal Zussman 2025-12-12 9:08 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Tal Zussman 2025-12-12 9:23 ` [tip: x86/urgent] x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> tip-bot2 for Tal Zussman 2025-12-13 10:07 ` tip-bot2 for Tal Zussman 2025-12-15 12:39 ` [PATCH v2 1/2] x86/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum Lorenzo Stoakes 2025-12-12 9:08 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Tal Zussman 2025-12-12 9:23 ` [tip: x86/urgent] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> tip-bot2 for Tal Zussman 2025-12-13 10:07 ` tip-bot2 for Tal Zussman 2025-12-15 12:40 ` [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS Lorenzo Stoakes 2025-12-15 13:35 ` Mathieu Desnoyers 2025-12-16 10:32 ` Lorenzo Stoakes
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®