From owner-svn-src-all@FreeBSD.ORG Fri Jan 16 10:11:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A0A2458; Fri, 16 Jan 2015 10:11:22 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3200CA4B; Fri, 16 Jan 2015 10:11:21 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 2E2D05A15; Fri, 16 Jan 2015 10:11:10 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id EDF78E15C; Fri, 16 Jan 2015 11:11:14 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexey Dokuchaev Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20150115142725.GA20964@FreeBSD.org> Date: Fri, 16 Jan 2015 11:11:14 +0100 In-Reply-To: <20150115142725.GA20964@FreeBSD.org> (Alexey Dokuchaev's message of "Thu, 15 Jan 2015 14:27:25 +0000") Message-ID: <86vbk7dohp.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:11:22 -0000 Alexey Dokuchaev 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