From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] dynamic cache allocation
Date: Sun, 8 Mar 2009 13:43:59 +0100 [thread overview]
Message-ID: <20090308124359.GA28707@thorin> (raw)
In-Reply-To: <49B2FB1A.9040208@gmail.com>
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."
next prev parent reply other threads:[~2009-03-08 12:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-07 22:54 [PATCH] dynamic cache allocation phcoder
2009-03-08 12:43 ` Robert Millan [this message]
2009-03-08 12:55 ` phcoder
2009-03-08 13:34 ` Vesa Jääskeläinen
2009-03-08 16:26 ` phcoder
2009-03-08 21:32 ` phcoder
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=20090308124359.GA28707@thorin \
--to=rmh@aybabtu.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.