Source-Changes-HG archive

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

[src/trunk]: src/sys/kern sched_takecpu(): for vfork(), when looking at curcp...



details:   https://anonhg.NetBSD.org/src/rev/d433e9a83966
branches:  trunk
changeset: 744135:d433e9a83966
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Jan 25 15:09:54 2020 +0000

description:
sched_takecpu(): for vfork(), when looking at curcpu's runqueue consider
maximum priority waiting to run and not count of LWPs.

diffstat:

 sys/kern/kern_runq.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r a40160cf7428 -r d433e9a83966 sys/kern/kern_runq.c
--- a/sys/kern/kern_runq.c      Sat Jan 25 15:08:40 2020 +0000
+++ b/sys/kern/kern_runq.c      Sat Jan 25 15:09:54 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_runq.c,v 1.61 2020/01/18 13:53:50 ad Exp $        */
+/*     $NetBSD: kern_runq.c,v 1.62 2020/01/25 15:09:54 ad Exp $        */
 
 /*-
  * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.61 2020/01/18 13:53:50 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.62 2020/01/25 15:09:54 ad Exp $");
 
 #include "opt_dtrace.h"
 
@@ -557,8 +557,8 @@
         */
        if (l->l_stat == LSIDL) {
                if (curlwp->l_vforkwaiting && l->l_class == SCHED_OTHER) {
-                       if (sched_migratable(l, curlwp->l_cpu) &&
-                           curlwp->l_cpu->ci_schedstate.spc_count == 0) {
+                       if (sched_migratable(l, curlwp->l_cpu) && eprio >
+                           curlwp->l_cpu->ci_schedstate.spc_maxpriority) {
                                return curlwp->l_cpu;
                        }
                } else {



Home | Main Index | Thread Index | Old Index