Re: [PATCH] replace various uses of num_physpages by totalram_pages

From: Ingo Molnar
Date: Tue Aug 18 2009 - 11:38:29 EST



* Jan Beulich <JBeulich@xxxxxxxxxx> wrote:

> Sizing of memory allocations shouldn't depend on the number of
> physical pages found in a system, as that generally includes
> (perhaps a huge amount of) non-RAM pages. The amount of what
> actually is usable as storage should instead be used as a basis
> here.
>
> Some of the calculations (i.e. those not intending to use high
> memory) should likely even use (totalram_pages -
> totalhigh_pages).
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
> Acked-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
>
> ---
> arch/x86/kernel/microcode_core.c | 4 ++--

Acked-by: Ingo Molnar <mingo@xxxxxxx>

Just curious: how did you find this bug? Did you find this by
experiencing problems on a system with a lot of declared non-RAM
memory?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/