summaryrefslogtreecommitdiffstats
path: root/master/debian/efi_disk_cache.patch
blob: 478e144414787a36df51fe9afad5873060f49805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Bump the values of GRUB_DISK_CACHE_SIZE and GRUB_DISK_CACHE_BITS
 on EFI systems (and only on EFI sytems) to dramatically reduce the load times
 for vmlinux and initrd.  Forwarding this isn't required as upstream trunk
 has completely rewritten how this all works.
Author: Adam Conrad <adconrad@debian.org>
Origin: other, http://blog.fpmurphy.com/2010/03/grub2-efi-support.html
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/944347
Forwarded: not-needed
Last-Update: 2012-03-05

Index: b/include/grub/disk.h
===================================================================
--- a/include/grub/disk.h
+++ b/include/grub/disk.h
@@ -137,7 +137,11 @@
 
 /* The size of a disk cache in 512B units. Must be at least as big as the
    largest supported sector size, currently 16K.  */
+#ifdef GRUB_MACHINE_EFI
+#define GRUB_DISK_CACHE_BITS	10
+#else
 #define GRUB_DISK_CACHE_BITS	6
+#endif
 #define GRUB_DISK_CACHE_SIZE	(1 << GRUB_DISK_CACHE_BITS)
 
 /* Return value of grub_disk_get_size() in case disk size is unknown. */