From owner-freebsd-arch@freebsd.org Fri Apr 22 19:33:59 2016 Return-Path: Delivered-To: freebsd-arch@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 56E62B19D84 for ; Fri, 22 Apr 2016 19:33:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 398201B7F for ; Fri, 22 Apr 2016 19:33:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 17768B93A for ; Fri, 22 Apr 2016 15:33:58 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Subject: Re: Starting APs earlier during boot Date: Fri, 22 Apr 2016 12:33:49 -0700 Message-ID: <1797307.a21JNIcVnp@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <1730061.8Ii36ORVKt@ralph.baldwin.cx> References: <1730061.8Ii36ORVKt@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 22 Apr 2016 15:33:58 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2016 19:33:59 -0000 On Tuesday, February 16, 2016 12:50:22 PM John Baldwin wrote: > Currently the kernel bootstraps the non-boot processors fairly early in the > SI_SUB_CPU SYSINIT. The APs then spin waiting to be "released". We currently > release the APs as one of the last steps at SI_SUB_SMP. On the one hand this > removes much of the need for synchronization while SYSINITs are running since > SYSINITs basically assume they are single-threaded. However, it also enforces > some odd quirks. Several places that deal with per-CPU resources have to > split initialization up so that the BSP init happens in one SYSINIT and the > initialization of the APs happens in a second SYSINIT at SI_SUB_SMP. I've posted a review of the final set of changes here: https://reviews.freebsd.org/D6069 To permit a smoother transition, the earlier startup is temporarily controlled by a kernel option (EARLY_AP_STARTUP) so that it can be easily disabled if there are regressions and to allow individual platforms to have time to port over. My plan is to enablet his by default on x86 once it is in the tree. I would like to have all platforms cut over for 11.0. -- John Baldwin