Messages in this thread | | | Date | Wed, 01 Jul 2009 07:54:00 +0100 | From | "Jan Beulich" <> | Subject | Re: [PATCH] replace various uses of num_physpages by totalram_pages |
| |
>>> Rusty Russell <rusty@rustcorp.com.au> 01.07.09 06:57 >>> >On Tue, 30 Jun 2009 08:38:32 pm Jan Beulich wrote: >> Sizing of memory allocations shouldn't depend on the number of physical >> pages found in a system, as that generally include (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. > >I like this patch. Where's num_physpages used after this: should it be an >arch-specific or even a static?
It's still being used for some hash value initialization in under net/, and in the generic power management code (kernel/power/). While the earlier part certainly looks replaceable, I'm not certain about the latter.
In any case it would seem like a first step might now be to no longer export the symbol (or, for a transitional period, make it an unused export).
Once all uses are gone, making it arch specific (reducing its scope as much as possible, up to complete elimination) would certainly seem desirable (not the least to perhaps finally address comments like "How many end- of-memory variables you have, grandma!").
Jan
| |