From owner-freebsd-current@freebsd.org Fri Dec 22 13:51:28 2017 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 555DDE99928 for ; Fri, 22 Dec 2017 13:51:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 1C40D774DF for ; Fri, 22 Dec 2017 13:51:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AA5CD260362; Fri, 22 Dec 2017 14:51:14 +0100 (CET) Subject: Re: [Request for review] Profiling the FreeBSD kernel boot To: Colin Percival , "freebsd-current@freebsd.org" References: <010001607d9c59d5-15b6b788-a7ea-4edf-96e4-1235dd1a5c26-000000@email.amazonses.com> From: Hans Petter Selasky Message-ID: <6d17d9f1-619e-98dd-d19f-7965171ea8fe@selasky.org> Date: Fri, 22 Dec 2017 14:48:26 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <010001607d9c59d5-15b6b788-a7ea-4edf-96e4-1235dd1a5c26-000000@email.amazonses.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 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: Fri, 22 Dec 2017 13:51:28 -0000 On 12/22/17 10:44, Colin Percival wrote: > track down the > places where we're wasting time during the boot, and then to fix them. Hi, The USB stack will try to enumerate all USB controllers simultaneously. DELAY() is frequently a problem having to wait for chips to reset during enumeration as you probably know. Getting timers enumerated early on allows to sleep instead of spin, also saving CPU usage during boot. I'm not sure if switching on too many PCI devices at the same time can cause any power issues. At least USB HUBs have an own delay per port it needs to wait until power is turned on. --HPS