Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2015 11:11:14 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Alexey Dokuchaev <danfe@FreeBSD.org>
Cc:        Adrian Chadd <adrian@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, Bryan Venteicher <bryanv@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, ae@FreeBSD.org, Slawa Olhovchenkov <slw@zxy.spb.ru>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, Edward Tomasz Napiera?a <trasz@FreeBSD.org>
Subject:   Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf
Message-ID:  <86vbk7dohp.fsf@nine.des.no>
In-Reply-To: <20150115142725.GA20964@FreeBSD.org> (Alexey Dokuchaev's message of "Thu, 15 Jan 2015 14:27:25 %2B0000")
References:  <201309062024.r86KOMqm059838@svn.freebsd.org> <CAGaYwLcV8hS%2Bk_B2xozcqfdz5TcJ%2BgyN=6whO8wJ_6puW1_njg@mail.gmail.com> <20130907081743.GB95723@zxy.spb.ru> <CAGaYwLcibUVY1C8BMUjRart75HBNMu4W-ddjSK5pHb3JYhf1Gg@mail.gmail.com> <20130907170700.GB3796@zxy.spb.ru> <CAJ-VmoksU9R4cPsVtxzMma_QHv0Hsm8mTCVixOEVKx2_uS-8eA@mail.gmail.com> <EE92600F-0A1B-4684-B928-410AE12B128D@FreeBSD.org> <20130907210244.GE3796@zxy.spb.ru> <20150115142725.GA20964@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexey Dokuchaev <danfe@FreeBSD.org> writes:
> Edward, Andrey, since you two seem to have some working code already,
> maybe you can work together to push out something that can be
> committed? :)

------------------------------------------------------------------------
r241053 | ae | 2012-09-29 18:47:56 +0200 (Sat, 29 Sep 2012) | 17 lines

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.

------------------------------------------------------------------------

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



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