Re: [PATCH] dynamic cache allocation

2009-03-08 Thread phcoder
Update to the patch phcoder wrote: Vesa Jääskeläinen wrote: phcoder wrote: Hello. Discussing with Robert Millan and Bean on IRC we noticed that disk cache index is statically allocated. Here is a proposal to change it to dynamic allocation proportional to the size of available memory. And the

Re: [PATCH] dynamic cache allocation

2009-03-08 Thread phcoder
Vesa Jääskeläinen wrote: phcoder wrote: Hello. Discussing with Robert Millan and Bean on IRC we noticed that disk cache index is statically allocated. Here is a proposal to change it to dynamic allocation proportional to the size of available memory. And the gain is ? Faster booting if exten

Re: [PATCH] dynamic cache allocation

2009-03-08 Thread Vesa Jääskeläinen
phcoder wrote: > Hello. Discussing with Robert Millan and Bean on IRC we noticed that > disk cache index is statically allocated. Here is a proposal to change > it to dynamic allocation proportional to the size of available memory. And the gain is ? __

Re: [PATCH] dynamic cache allocation

2009-03-08 Thread phcoder
Robert Millan wrote: On Sat, Mar 07, 2009 at 11:54:18PM +0100, phcoder wrote: + grub_disk_cache_table = (struct grub_disk_cache *) + grub_malloc (grub_disk_cache_num * sizeof (struct grub_disk_cache)); [...] + By default use up to one quarter of memory available for allocation */ +

Re: [PATCH] dynamic cache allocation

2009-03-08 Thread Robert Millan
On Sat, Mar 07, 2009 at 11:54:18PM +0100, phcoder wrote: > + grub_disk_cache_table = (struct grub_disk_cache *) > + grub_malloc (grub_disk_cache_num * sizeof (struct grub_disk_cache)); > [...] > + By default use up to one quarter of memory available for allocation */ > +#define GRUB_DIS

[PATCH] dynamic cache allocation

2009-03-07 Thread phcoder
Hello. Discussing with Robert Millan and Bean on IRC we noticed that disk cache index is statically allocated. Here is a proposal to change it to dynamic allocation proportional to the size of available memory. -- Regards Vladimir 'phcoder' Serbinenko Index: kern/disk.c