From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 13 23:29:03 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E14C61065678 for ; Wed, 13 Jun 2012 23:29:03 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9B4F08FC1E for ; Wed, 13 Jun 2012 23:29:03 +0000 (UTC) Received: by yhgm50 with SMTP id m50so1221365yhg.13 for ; Wed, 13 Jun 2012 16:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IM6AAT1lkTTsRek0T2THtQbKaqpKvKvhkhHliZlToM4=; b=k66ZkIOV2M/wNZaD2kWKoXDz13zJCCrWfSuwv8/5bytETe1eAX7HX3THpjzbfZallG FOXLG7T5KNeW1kIxRZhx5ic7N+Ta3vfcjtN7xV041+Ko2FkTeYcTDG/m7fxAqYZBBdbm 30EHCEe1hdjPe7jJI4EYK+KbhmBhqvU6stjGypVOucsmH48tp8r7skcer+eLbIxgcWXF FbxEQZW5iCuu40HOJKJnldhBcJ4XAYgbHTZfVFvS3AQGATETy7denYtAKLlrx6qZ6ohb qmQMLi00tcErfsduN/gKRGojQPp4WqHVXebQy7z7zDvvb1pduIUvyqwiiPkzz0g/UNLS eMNw== MIME-Version: 1.0 Received: by 10.60.29.137 with SMTP id k9mr26936341oeh.23.1339630142897; Wed, 13 Jun 2012 16:29:02 -0700 (PDT) Received: by 10.182.53.1 with HTTP; Wed, 13 Jun 2012 16:29:02 -0700 (PDT) In-Reply-To: <4FD91913.20607@thebarn.com> References: <20336.1339571779@critter.freebsd.dk> <4FD91913.20607@thebarn.com> Date: Wed, 13 Jun 2012 16:29:02 -0700 Message-ID: From: Mehmet Erol Sanliturk To: Russell Cattelan Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD Boot Times X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2012 23:29:04 -0000 On Wed, Jun 13, 2012 at 3:49 PM, Russell Cattelan wrote: > On 6/13/12 2:16 AM, Poul-Henning Kamp wrote: > > In message , > Wojci > > ech Puchar writes: > > > > One of the major slowdowns is that we do all the device drivers > > serially & synchronously. > Yes definitely. > > I have been looking into how to potentially defer or parallelize > device_attach'es. Defer is turning out to be hard enough since each > system is has different requirements to reach a state where it can > run /sbin/init. I've started with the John Baldwin's multipass work > and have a system stops probing/attaching devices and allows the boot > to continue on. > > The remaining passes I'm triggering from userspace once the system is up. > > This is all very crude at this point and has been an some work just > to understand how the kernel startup code all links together. > > Note systemd looks interesting from from a demand based startup scheme > much like apples launchd. (note systemd uses linux process groups so > porting it would take some effort) > > Ideally it would be nice to get to the point where many devices are only > attached once there is a demand for it. Say network interfaces for > example: attach it once the init scripts need to config it and then > hopefully in an async fashion. Unfortunately that will require locking > a bit more fine grain than the current "Giant" lock. > > -Russell > > > > To reduce the boot time , my opinion is as follows : During install or by using a program , generate a "Hardware Profile File" . By editing it , mark some devices "No check" ( for example , a network card or PS/2 mouse or key board , is not connected , RS-232 , Firewire , unused SATA ports , unused IDE ports , etc. , then it is not necessary to check them . ) During boot , first read that "Hardware Profile File" . Only check ports marked as "Check" . After completion of boot , the other ports may checked to update "Hardware Profile File" if it is requested in "Hardware Profile File" . Later on , assume a new device is attached . Run the "Hardware Profile" program to regenerate the "Hardware Profile File" , or by using dmesg , manually add this device into "Hardware Profile File" . For removable devices , if some USB , etc. ports are not used , they all may be marked as "No Check" , for example internal USB ports , unused back panel ports . I do not know such a scheme is useful or not , or usable or not . If I were a boot manager program writer , I would try it . To my knowledge which I may be wrong , at present there is no such a facility . Thank you very much . Mehmet Erol Sanliturk