From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Q6zoY-0008CP-Sz for mharc-grub-devel@gnu.org; Tue, 05 Apr 2011 02:32:34 -0400 Received: from [140.186.70.92] (port=52146 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q6zoV-0008Bw-OD for grub-devel@gnu.org; Tue, 05 Apr 2011 02:32:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q6zoU-00038h-OU for grub-devel@gnu.org; Tue, 05 Apr 2011 02:32:31 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:33073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6zoU-00038T-JY for grub-devel@gnu.org; Tue, 05 Apr 2011 02:32:30 -0400 Received: by wwi18 with SMTP id 18so2317700wwi.0 for ; Mon, 04 Apr 2011 23:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=5nlXHqdacrnm0JQsT/Hb89iyoeUpAinrhA5CnyPfAq0=; b=eDdUGkdutFewPg6c0PmK8RhDgfEMsVKuU3484ejBh6cFvCaaPok/J8Q7Q2r3ZwekQ8 gvr/0LhkgijH0rXxlBZepnQSDkjBqPcDr+4O603QbC4t76oA4nwTdX222enA+u3wK+he /cL2Rokn2/IGsnyRvIiVFoIB6a1Ca9SlFrbP0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=AFs8znPYG8Dpe6l4YTxFD9JKldDPMb1NSzyEJhrX2osBjOAVo9vq1g6stQmnkHJ1qK CYlHKOvy8FU1v/KjNBGUVBXfo2fDznYg3WowxdhBPu1xCvE2HZXpQrbSD3Xfbh4Mf6ha CICzDBaDg0LFXW3zdtBP7B7U+VPOBLWs6xh10= Received: by 10.216.143.135 with SMTP id l7mr4623867wej.86.1301985149315; Mon, 04 Apr 2011 23:32:29 -0700 (PDT) Received: from debian.x201.phnet (public-docking-hg-6-208.ethz.ch [129.132.216.208]) by mx.google.com with ESMTPS id y29sm3332141wbd.38.2011.04.04.23.32.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Apr 2011 23:32:28 -0700 (PDT) Message-ID: <4D9AB77A.9090803@gmail.com> Date: Tue, 05 Apr 2011 08:32:26 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110402 Iceowl/1.0b2 Icedove/3.1.9 MIME-Version: 1.0 To: The development of GNU GRUB References: <202218.1487.qm@web120001.mail.ne1.yahoo.com> In-Reply-To: <202218.1487.qm@web120001.mail.ne1.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.41 Subject: Re: Grub2 EFI: Image loading from USB takes too long X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2011 06:32:32 -0000 On 05.04.2011 07:33, Aravind Srinivasan wrote: > include/grub/disk.h > > /* The size of a disk cache in sector units. */ > #define GRUB_DISK_CACHE_SIZE 8 > #define GRUB_DISK_CACHE_BITS 3 > > > I tried changing this value to 8192 - and the time it took to load the same > image came down to 10 secs ! > /* The size of a disk cache in sector units. */ > #define GRUB_DISK_CACHE_SIZE 8192 > #define GRUB_DISK_CACHE_BITS 13 > > I am not sure of the reason for setting the cache size to a low value and any > possible issues in increasing this size. Appreciate any input on this. This value is a misnomer. It's not a cache size but a cache unit size. As immediate effect it has that if one reads a single 512B, sector one reads an entire block of 4K. Under normal conditions values of around 32K-128K (6-8/64-256) would be optimal. It seems that some EFI implementations do a "buffering" only to discard the buffered data. Some of the reports suggest that this braindamage is limited to disk io and doesn't happen with Block IO. Values you propose would result in 4M reads even when one needs just few sectors and so is suboptimal under normal conditions. I'll prepare few patches to investigate. After 1.99 the GRUB_DISK_CACHE_BITS will be increased to 6-8 range since, it's optimal and my AF support requires sector size to be smaller than cache unit size. -- Regards Vladimir 'φ-coder/phcoder' Serbinenko