Module Name: src Committed By: mlelstv Date: Fri Nov 30 15:05:35 UTC 2018
Modified Files: src/sys/kern: kern_synch.c Log Message: The SHOULDYIELD flag doesn't indicate that other LWPs could run but only that the current LWP was seen on two consecutive scheduler intervals. There are currently at least 3 cases for calling preempt(). - always call preempt() - check the SHOULDYIELD flag - check the real ci_want_resched So the forced check for SHOULDYIELD changed the scheduler timing. Revert it for now. To generate a diff of this commit: cvs rdiff -u -r1.321 -r1.322 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.321 src/sys/kern/kern_synch.c:1.322 --- src/sys/kern/kern_synch.c:1.321 Wed Nov 28 19:46:22 2018 +++ src/sys/kern/kern_synch.c Fri Nov 30 15:05:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_synch.c,v 1.321 2018/11/28 19:46:22 mlelstv Exp $ */ +/* $NetBSD: kern_synch.c,v 1.322 2018/11/30 15:05:35 mlelstv Exp $ */ /*- * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009 @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.321 2018/11/28 19:46:22 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.322 2018/11/30 15:05:35 mlelstv Exp $"); #include "opt_kstack.h" #include "opt_dtrace.h" @@ -286,10 +286,6 @@ preempt(void) { struct lwp *l = curlwp; - /* check if the scheduler has another LWP to run */ - if ((l->l_cpu->ci_schedstate.spc_flags & SPCF_SHOULDYIELD) == 0) - return; - KERNEL_UNLOCK_ALL(l, &l->l_biglocks); lwp_lock(l); KASSERT(lwp_locked(l, l->l_cpu->ci_schedstate.spc_lwplock));