Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2012 07:53:59 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        "Andrey V. Elsukov" <ae@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot
Message-ID:  <201210010753.59816.jhb@freebsd.org>
In-Reply-To: <201209291647.q8TGlvbr058837@svn.freebsd.org>
References:  <201209291647.q8TGlvbr058837@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, September 29, 2012 12:47:57 pm Andrey V. Elsukov wrote:
> Author: ae
> Date: Sat Sep 29 16:47:56 2012
> New Revision: 241053
> URL: http://svn.freebsd.org/changeset/base/241053
> 
> Log:
>   Almost each time when loader opens a file, this leads to calling
>   disk_open(). Very often this is called several times for one file.
>   This leads to reading partition table metadata for each call. To
>   reduce the number of disk I/O we have a simple block cache, but it
>   is very dumb and more than half of I/O operations related to reading
>   metadata, misses this cache.
>   
>   Introduce new cache layer to resolve this problem. It is independent
>   and doesn't need initialization like bcache, and will work by default
>   for all loaders which use the new DISK API. A successful disk_open()
>   call to each new disk or partition produces new entry in the cache.
>   Even more, when disk was already open, now opening of any nested
>   partitions does not require reading top level partition table.
>   So, if without this cache, partition table metadata was read around
>   20-50 times during boot, now it reads only once. This affects the booting
>   from GPT and MBR from the UFS.

...and removes support for removable media like floppies.  That may be the
proper thing to do at this stage (though I think that affects PC98 still
perhaps?)  However, removing suppot for removable media should be an
intentional decision, not a side effect.  The bcache was simplistic
precisely to support floppies.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210010753.59816.jhb>