Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
Re: Zap bogus context switch count
To:
Christian Ludwig <cludwig@genua.de>
Cc:
tech@openbsd.org
Date:
Fri, 6 Sep 2024 10:16:51 +0200

Download raw body.

Thread
On Thu, Sep 05, 2024 at 09:33:48PM +0200, Christian Ludwig wrote:
> 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
 
This is indeed a double count. OK claudio@


-- 
:wq Claudio