All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Grub2 EFI: Image loading from USB takes too long
Date: Tue, 05 Apr 2011 08:32:26 +0200	[thread overview]
Message-ID: <4D9AB77A.9090803@gmail.com> (raw)
In-Reply-To: <202218.1487.qm@web120001.mail.ne1.yahoo.com>

On 05.04.2011 07:33, Aravind Srinivasan wrote:
> include/grub/disk.h
> <snip>
> /* The size of a disk cache in sector units.  */
> #define GRUB_DISK_CACHE_SIZE   8
> #define GRUB_DISK_CACHE_BITS   3
> <snip>
>
> 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



  reply	other threads:[~2011-04-05  6:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05  5:33 Grub2 EFI: Image loading from USB takes too long Aravind Srinivasan
2011-04-05  6:32 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2011-04-05  7:36   ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-05 16:36     ` Aravind Srinivasan
2011-04-05  6:32 ` Seth Goldberg
2011-04-05  7:17   ` KESHAV P.R.
2011-04-05  7:43     ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-05  8:06       ` KESHAV P.R.
  -- strict thread matches above, loose matches on Subject: below --
2011-04-06 16:12 Aravind Srinivasan
2011-04-07  9:24 ` KESHAV P.R.
2011-04-08 16:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-15  2:45   ` Bean
2011-04-15  6:55     ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-15  8:18       ` Seth Goldberg
2011-04-15 19:54         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-06-23 16:02           ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-25  4:14       ` Bean
2011-04-25 10:58         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-26  3:03           ` Bean
2011-04-26 10:36             ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-15 16:07 Finnbarr P. Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D9AB77A.9090803@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.