Index | Thread | Search

From:
Christian Ludwig <cludwig@genua.de>
Subject:
Zap bogus context switch count
To:
<tech@openbsd.org>
Date:
Thu, 5 Sep 2024 21:33:48 +0200

Download raw body.

Thread
Hi,

We do not switch contexts at that point. By the time we really do in
sched_exit(), we also account for it already.

So long,


 - Christian

---
 sys/kern/kern_exit.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index fb611534bf8d..229256d6ed85 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -390,7 +390,6 @@ exit1(struct proc *p, int xexit, int xsig, int flags)
 	 * Note that cpu_exit() will end with a call equivalent to
 	 * cpu_switch(), finishing our execution (pun intended).
 	 */
-	uvmexp.swtch++;
 	cpu_exit(p);
 	panic("cpu_exit returned");
 }
-- 
2.34.1