From owner-freebsd-current@freebsd.org Thu Dec 24 18:13:14 2015 Return-Path: Delivered-To: freebsd-current@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 4A9EFA501B6; Thu, 24 Dec 2015 18:13:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 BE5C610A9; Thu, 24 Dec 2015 18:13:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tBOID9cb060771 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 24 Dec 2015 20:13:09 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tBOID9cb060771 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tBOID8OR060770; Thu, 24 Dec 2015 20:13:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 24 Dec 2015 20:13:08 +0200 From: Konstantin Belousov To: Ian Lepore Cc: Oliver Pinter , Vijay Rajah , freebsd-questions@freebsd.org, freebsd-current@freebsd.org Subject: Re: Need help with New Build -- Skylake Message-ID: <20151224181308.GZ3625@kib.kiev.ua> References: <20151224173146.H8562@sola.nimnet.asn.au> <567BA5BB.4020304@rvijay.me> <1450970960.25138.242.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450970960.25138.242.camel@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 18:13:14 -0000 On Thu, Dec 24, 2015 at 08:29:20AM -0700, Ian Lepore wrote: > We had exactly this symptom -- long delay with spincursor before > loading the kernel -- on arm systems when we first enabled forth in > loader. The problem turned out to be the fact that loader was running > with instruction and data caches disabled, and it took about 90-100 > seconds to parse the 547 lines of text (almost all useless) in > /boot/defaults/loader.conf. We stripped that file down to the dozen or > so lines that actually needed to be there and booting became much > faster. Eventually we got the caches enabled in the prior-stage > bootloader and it became really fast. It is highly unlikely that caches are the source of the slowness. On x86, we rely on the firmware (BIOS or EFI) to properly configure both DRAM controllers and caches. More, Intel considers the corresponding controllers configuration recipes as highly secret and, even for BIOS vendors, Intel provides the binary blob of code which does the config magic, instead of the documentation. That said, loader runs in the unpaged protected mode but reflects BIOS calls into the real mode. Quite possible, either the real mode is slow on SkyLakes, or even more possible, the switch between real and protected mode is slow, or the protected mode without paging enabled is slow. Or might be the PCH lacks the ISA timer. A developer needs the real machine to diagnose the cause.