[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173146679112.32228.10142601274582847300.tip-bot2@tip-bot2>
Date: Wed, 13 Nov 2024 02:59:51 -0000
From: "tip-bot2 for Rik van Riel" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Dave Hansen <dave.hansen@...el.com>, Rik van Riel <riel@...riel.com>,
Ingo Molnar <mingo@...nel.org>, Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: x86/mm] x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU
The following commit has been merged into the x86/mm branch of tip:
Commit-ID: c058cc5fedf0cc2d05d44b166e155690e101aa6e
Gitweb: https://git.kernel.org/tip/c058cc5fedf0cc2d05d44b166e155690e101aa6e
Author: Rik van Riel <riel@...riel.com>
AuthorDate: Fri, 08 Nov 2024 19:27:49 -05:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 13 Nov 2024 03:42:41 +01:00
x86/mm/tlb: Add tracepoint for TLB flush IPI to stale CPU
Add a tracepoint when we send a TLB flush IPI to a CPU that used
to be in the mm_cpumask, but isn't any more.
This can be used to evaluate whether there any workloads where
we end up in this path problematically often. Hopefully they
don't exist.
Suggested-by: Dave Hansen <dave.hansen@...el.com>
Signed-off-by: Rik van Riel <riel@...riel.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Link: https://lore.kernel.org/r/20241109003727.3958374-3-riel@surriel.com
---
arch/x86/mm/tlb.c | 1 +
include/linux/mm_types.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index cc4e57a..1aac4fa 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -760,6 +760,7 @@ static void flush_tlb_func(void *info)
/* Can only happen on remote CPUs */
if (f->mm && f->mm != loaded_mm) {
cpumask_clear_cpu(raw_smp_processor_id(), mm_cpumask(f->mm));
+ trace_tlb_flush(TLB_REMOTE_WRONG_CPU, 0);
return;
}
}
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 6e3bdf8..6b6f054 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -1335,6 +1335,7 @@ enum tlb_flush_reason {
TLB_LOCAL_SHOOTDOWN,
TLB_LOCAL_MM_SHOOTDOWN,
TLB_REMOTE_SEND_IPI,
+ TLB_REMOTE_WRONG_CPU,
NR_TLB_FLUSH_REASONS,
};
Powered by blists - more mailing lists