Date: Sat, 12 Nov 2016 00:23:09 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308565 - head/sys/kern Message-ID: <201611120023.uAC0N9fe018532@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Sat Nov 12 00:23:09 2016 New Revision: 308565 URL: https://svnweb.freebsd.org/changeset/base/308565 Log: Allow scheduling during early boot. - Send IPI wakeups once SMP is started even if cold is true. - Permit preemptions when cold is true. These changes are needed for EARLY_AP_STARTUP. MFC after: 2 weeks Sponsored by: Netflix Modified: head/sys/kern/sched_4bsd.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Sat Nov 12 00:14:13 2016 (r308564) +++ head/sys/kern/sched_4bsd.c Sat Nov 12 00:23:09 2016 (r308565) @@ -326,7 +326,6 @@ maybe_preempt(struct thread *td) * - The current thread has a higher (numerically lower) or * equivalent priority. Note that this prevents curthread from * trying to preempt to itself. - * - It is too early in the boot for context switches (cold is set). * - The current thread has an inhibitor set or is in the process of * exiting. In this case, the current thread is about to switch * out anyways, so there's no point in preempting. If we did, @@ -347,7 +346,7 @@ maybe_preempt(struct thread *td) ("maybe_preempt: trying to run inhibited thread")); pri = td->td_priority; cpri = ctd->td_priority; - if (panicstr != NULL || pri >= cpri || cold /* || dumping */ || + if (panicstr != NULL || pri >= cpri /* || dumping */ || TD_IS_INHIBITED(ctd)) return (0); #ifndef FULL_PREEMPTION @@ -1105,7 +1104,7 @@ forward_wakeup(int cpunum) if ((!forward_wakeup_enabled) || (forward_wakeup_use_mask == 0 && forward_wakeup_use_loop == 0)) return (0); - if (!smp_started || cold || panicstr) + if (!smp_started || panicstr) return (0); forward_wakeups_requested++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611120023.uAC0N9fe018532>