Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern If no more softints are pending on this cpu, clear ...



details:   https://anonhg.NetBSD.org/src/rev/7ac6e00338bc
branches:  trunk
changeset: 372532:7ac6e00338bc
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Dec 05 15:47:14 2022 +0000

description:
If no more softints are pending on this cpu, clear ci_want_resched
(instead of just assingning ci_data.cpu_softints to it - the bitsets
are not the same).
Discussed on tech-kern "ci_want_resched bits vs. MD ci_data.cpu_softints bits".

diffstat:

 sys/kern/kern_synch.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r e12890952178 -r 7ac6e00338bc sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c     Mon Dec 05 15:00:19 2022 +0000
+++ b/sys/kern/kern_synch.c     Mon Dec 05 15:47:14 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_synch.c,v 1.352 2022/10/26 23:23:28 riastradh Exp $       */
+/*     $NetBSD: kern_synch.c,v 1.353 2022/12/05 15:47:14 martin Exp $  */
 
 /*-
  * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009, 2019, 2020
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.352 2022/10/26 23:23:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.353 2022/12/05 15:47:14 martin Exp $");
 
 #include "opt_kstack.h"
 #include "opt_dtrace.h"
@@ -554,7 +554,8 @@
         * the update to ci_want_resched will become globally visible before
         * the release of spc_mutex becomes globally visible.
         */
-       ci->ci_want_resched = ci->ci_data.cpu_softints;
+       if (ci->ci_data.cpu_softints == 0)
+               ci->ci_want_resched = 0;
 
        return newl;
 }



Home | Main Index | Thread Index | Old Index