Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Q79FT-00068L-BM for mharc-grub-devel@gnu.org; Tue, 05 Apr 2011 12:36:59 -0400 Received: from [140.186.70.92] (port=37964 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q79FQ-000653-Jp for grub-devel@gnu.org; Tue, 05 Apr 2011 12:36:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q79FP-0008Qr-EI for grub-devel@gnu.org; Tue, 05 Apr 2011 12:36:56 -0400 Received: from nm18.bullet.mail.ne1.yahoo.com ([98.138.90.81]:42487) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Q79FP-0008Qf-88 for grub-devel@gnu.org; Tue, 05 Apr 2011 12:36:55 -0400 Received: from [98.138.90.57] by nm18.bullet.mail.ne1.yahoo.com with NNFMP; 05 Apr 2011 16:36:53 -0000 Received: from [98.138.87.10] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 05 Apr 2011 16:36:53 -0000 Received: from [127.0.0.1] by omp1010.mail.ne1.yahoo.com with NNFMP; 05 Apr 2011 16:36:53 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 238067.47892.bm@omp1010.mail.ne1.yahoo.com Received: (qmail 4783 invoked by uid 60001); 5 Apr 2011 16:36:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1302021413; bh=/3rQ8I7uZ4m1/V5wxn/ENeg2wAkm5DScq1OKK7bCrjM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=nV61OXBKjdNci8PjFST97pOKZ2Sm9VmLO5Wkpvm9/vidQ7OFkLu0LiIIA0hPPFznjSXvhTVhJPYnut6EyHlPekgUo6ju3OgJk40MXApkR9ge7T+VkVa51DPY3qRxfVJW3yCOZBWBo/S7XTdOIy4tKU+zLiZpKcoIqCFVs2bTHu4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ygOtszbD72NV2KaGVOE0xD8KQskdRl/+dUlUBWvMo1MuPcdv7P31CJdDgTG1yQtSapz1VVizyi9r/7p/nDXx/x4zYap6w07HWPRGTmEdO5qKrrIQONkifcbYbPSUqMfOA322VgzljQF0hk0TuTxlqMx/DGseo3LgwYh+3ffOGlU=; Message-ID: <140422.85433.qm@web120013.mail.ne1.yahoo.com> X-YMail-OSG: oRN8pZUVM1lM2lpBCsj_iqefgcOBIA2TCvuaFl8ifGwXVRA w.BrUEpBvvMxbEwngxlT0zrbdsBTgNtzMla4HTrd9fV_UmDBlyGBVNjkOlam 8q6.V7EY_7yOQqptBH26eyhHV7blHfkdGbHr16cqT6qkKXQTSxIgB4yznPZ8 WPY6XkaskXeCBtO5VTqnxyfoYmf9AdHuIivVtqBsmPNYnZzJzN1hZCrpCAEU piqo9c8HQvEJ3DPWFVdMELM5DuqyWGIZ3.Vra2XnLbBvCRRZNk77tR9RokHG IILzag2JCn_SLCSntS6S_8RNdXIhN2.VwKSgNmp4Y6v5zcnakkpk_XrL7AHV qB_9_EKMjolnIHC_3aGgbFrW4jk8nCMWiTM2fcXTkZK9vGxQ0.O6Vyw-- Received: from [128.107.239.233] by web120013.mail.ne1.yahoo.com via HTTP; Tue, 05 Apr 2011 09:36:52 PDT X-Mailer: YahooMailRC/559 YahooMailWebService/0.8.109.295617 References: <202218.1487.qm@web120001.mail.ne1.yahoo.com> <4D9AB77A.9090803@gmail.com> <4D9AC683.5070909@gmail.com> Date: Tue, 5 Apr 2011 09:36:52 -0700 (PDT) From: Aravind Srinivasan To: The development of GNU GRUB In-Reply-To: <4D9AC683.5070909@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 98.138.90.81 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 16:36:57 -0000 =0A=0ATried the block IO patch. It is much better than the current default = performance =0Aof 1.99. For the same initrd image (160M), loading from USB = took approx 20 secs. =0AI also tried changing the value of GRUB_DISK_CACHE_= BITS from 6 to 8, and load =0Atime improved to approx 12 secs.=0AJust to no= te, on Legacy Grub, this gets loaded almost in 3 secs.=0A=0AThanks,=0AAravi= nd=0A=0A=0A----- Original Message ----=0AFrom: Vladimir '=CF=86-coder/phcod= er' Serbinenko =0ATo: The development of GNU GRUB =0ASent: Tue, April 5, 2011 12:36:35 AM=0ASubject: Re: Grub2 = EFI: Image loading from USB takes too long=0A=0AOn 05.04.2011 08:32, Vladim= ir '=CF=86-coder/phcoder' Serbinenko wrote:=0A> On 05.04.2011 07:33, Aravin= d Srinivasan wrote:=0A>> include/grub/disk.h=0A>> =0A>> /* The size o= f a disk cache in sector units. */=0A>> #define GRUB_DISK_CACHE_SIZE 8= =0A>> #define GRUB_DISK_CACHE_BITS 3=0A>> =0A>> =0A>> I tried chang= ing this value to 8192 - and the time it took to load the same=0A>> image c= ame down to 10 secs !=0A>> /* The size of a disk cache in sector units. */= =0A>> #define GRUB_DISK_CACHE_SIZE 8192=0A>> #define GRUB_DISK_CACHE_BITS= 13=0A>> =0A>> I am not sure of the reason for setting the cache size to = a low value and any=0A>> possible issues in increasing this size. Appreciat= e any input on this.=0A> This value is a misnomer. It's not a cache size bu= t a cache unit size. As =0A>immediate effect it has that if one reads a sin= gle 512B, sector one reads an =0A>entire block of 4K. Under normal conditio= ns values of around 32K-128K =0A>(6-8/64-256) would be optimal. It seems th= at some EFI implementations do a =0A>"buffering" only to discard the buffer= ed data. Some of the reports suggest that =0A>this braindamage is limited t= o disk io and doesn't happen with Block IO. Values =0A>you propose would re= sult in 4M reads even when one needs just few sectors and so =0A>is subopti= mal under normal conditions.=0A> I'll prepare few patches to investigate.= =0A> After 1.99 the GRUB_DISK_CACHE_BITS will be increased to 6-8 range sin= ce, it's =0A>optimal and my AF support requires sector size to be smaller t= han cache unit =0A>size.=0A> =0AAttached a patch based on my AF patch which= change to block IO.=0A=0A-- Regards=0AVladimir '=CF=86-coder/phcoder' Serb= inenko