mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
mm: replace various uses of num_physpages by totalram_pages
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 <[email protected]> Acked-by: Rusty Russell <[email protected]> Acked-by: Ingo Molnar <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Patrick McHardy <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4738e1b9cf
commit
4481374ce8
21 changed files with 38 additions and 41 deletions
|
|
@ -96,11 +96,7 @@ static struct balloon_stats balloon_stats;
|
|||
/* We increase/decrease in batches which fit in a page */
|
||||
static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)];
|
||||
|
||||
/* VM /proc information for memory */
|
||||
extern unsigned long totalram_pages;
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
extern unsigned long totalhigh_pages;
|
||||
#define inc_totalhigh_pages() (totalhigh_pages++)
|
||||
#define dec_totalhigh_pages() (totalhigh_pages--)
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue