All of lore.kernel.org
 help / color / mirror / Atom feed
* A patch to enhance biosdisk initrd loading speed for grub2
@ 2012-08-01 14:04 Wang Weber
  2012-08-01 20:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Weber @ 2012-08-01 14:04 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

Hi,

I am very interested in GRUB2. Recently I found that the linux initrd
loading speed (i386-pc) is quite poor compared with GRUB1. I compared
grub-1.98 with grub0.97, it is almost 7 times worse.

After checking the code of them, the reason is GRUB1 has a simple track
buffer for biosdisk, every time it tries to read a whole track from disk if
possible. For GRUB2, there is no such buffer, so it will read less than a
track every time. This greatly affects the performance of disk reading.

I see that grub2.00 extends the generic disk cache from 8 sectors
(grub1.98) to 64 sectors. This helps to increase the performance, however
it is still worse than GRUB1.

So I ported the track buffer from GRUB1 to grub1.98 and grub2.00, my test
with a USB stick shows that loading a 106M initrd (it is true, we use big
initrd), grub2.00 costs about 15 seconds, with this patch grub2.00 costs
about 11 seconds.

The performance increment is bigger on grub1.98 than on grub2.00, because
grub2.00 has a larger cache. However, I believe it is reasonable to add
additional buffer layer for specific architecture/platform. Specifically
for i386-pc, there is a legacy 63 sectors per track limitation, the
additional buffer greatly enhance disk reading performance.

I am very glad if you are interested in this patch, and I am glad to share
it with the GRUB community. Indeed, GRUB2 is a wonderful tool, you did a
great job!

Thanks,
-Wenbo(Weber)

[-- Attachment #2: Type: text/html, Size: 1629 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-01 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 14:04 A patch to enhance biosdisk initrd loading speed for grub2 Wang Weber
2012-08-01 20:28 ` Vladimir 'φ-coder/phcoder' Serbinenko

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.