Module Name: src
Committed By: martin
Date: Mon Dec 5 15:47:14 UTC 2022
Modified Files:
src/sys/kern: kern_synch.c
Log Message:
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".
To generate a diff of this commit:
cvs rdiff -u -r1.352 -r1.353 src/sys/kern/kern_synch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.352 src/sys/kern/kern_synch.c:1.353
--- src/sys/kern/kern_synch.c:1.352 Wed Oct 26 23:23:28 2022
+++ src/sys/kern/kern_synch.c Mon Dec 5 15:47:14 2022
@@ -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 @@ nextlwp(struct cpu_info *ci, struct sche
* 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;
}