grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] dynamic cache allocation


From: Robert Millan
Subject: Re: [PATCH] dynamic cache allocation
Date: Sun, 8 Mar 2009 13:43:59 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

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_DISK_CACHE_DIVIDE       16536

I might be missing something, but I think this implies our cache will stop
working if the memory map doesn't include a contigous block that is as big
as one quarter of total memory.

I think we should be more conservative and define an upper bound for how
big our cache is supposed to be in a normal use case.  In most cases, we'll
have as much memory available as we need for this purpose, and it's only a
few situations (i.e. machines with very low memory) that might be a problem.

Thoughts?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]