From owner-svn-src-stable-11@freebsd.org Thu Dec 15 22:39:53 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8433BC82BC8; Thu, 15 Dec 2016 22:39:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 538DC1990; Thu, 15 Dec 2016 22:39:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFMdqcv039306; Thu, 15 Dec 2016 22:39:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFMdqnY039305; Thu, 15 Dec 2016 22:39:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201612152239.uBFMdqnY039305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 15 Dec 2016 22:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310129 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 22:39:53 -0000 Author: jhb Date: Thu Dec 15 22:39:52 2016 New Revision: 310129 URL: https://svnweb.freebsd.org/changeset/base/310129 Log: MFC 308565: 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. Modified: stable/11/sys/kern/sched_4bsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sched_4bsd.c ============================================================================== --- stable/11/sys/kern/sched_4bsd.c Thu Dec 15 21:26:58 2016 (r310128) +++ stable/11/sys/kern/sched_4bsd.c Thu Dec 15 22:39:52 2016 (r310129) @@ -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++;