mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mm: rename global_page_state to global_zone_page_state
global_page_state is error prone as a recent bug report pointed out [1].
It only returns proper values for zone based counters as the enum it
gets suggests. We already have global_node_page_state so let's rename
global_page_state to global_zone_page_state to be more explicit here.
All existing users seems to be correct:
$ git grep "global_page_state(NR_" | sed 's@.*(\(NR_[A-Z_]*\)).*@\1@' | sort | uniq -c
2 NR_BOUNCE
2 NR_FREE_CMA_PAGES
11 NR_FREE_PAGES
1 NR_KERNEL_STACK_KB
1 NR_MLOCK
2 NR_PAGETABLE
This patch shouldn't introduce any functional change.
[1] http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Signed-off-by: Johannes Weiner <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4da243ac1c
commit
c41f012ade
9 changed files with 25 additions and 25 deletions
|
|
@ -80,7 +80,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
|||
show_val_kb(m, "Active(file): ", pages[LRU_ACTIVE_FILE]);
|
||||
show_val_kb(m, "Inactive(file): ", pages[LRU_INACTIVE_FILE]);
|
||||
show_val_kb(m, "Unevictable: ", pages[LRU_UNEVICTABLE]);
|
||||
show_val_kb(m, "Mlocked: ", global_page_state(NR_MLOCK));
|
||||
show_val_kb(m, "Mlocked: ", global_zone_page_state(NR_MLOCK));
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
show_val_kb(m, "HighTotal: ", i.totalhigh);
|
||||
|
|
@ -114,9 +114,9 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
|||
show_val_kb(m, "SUnreclaim: ",
|
||||
global_node_page_state(NR_SLAB_UNRECLAIMABLE));
|
||||
seq_printf(m, "KernelStack: %8lu kB\n",
|
||||
global_page_state(NR_KERNEL_STACK_KB));
|
||||
global_zone_page_state(NR_KERNEL_STACK_KB));
|
||||
show_val_kb(m, "PageTables: ",
|
||||
global_page_state(NR_PAGETABLE));
|
||||
global_zone_page_state(NR_PAGETABLE));
|
||||
#ifdef CONFIG_QUICKLIST
|
||||
show_val_kb(m, "Quicklists: ", quicklist_total_size());
|
||||
#endif
|
||||
|
|
@ -124,7 +124,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
|||
show_val_kb(m, "NFS_Unstable: ",
|
||||
global_node_page_state(NR_UNSTABLE_NFS));
|
||||
show_val_kb(m, "Bounce: ",
|
||||
global_page_state(NR_BOUNCE));
|
||||
global_zone_page_state(NR_BOUNCE));
|
||||
show_val_kb(m, "WritebackTmp: ",
|
||||
global_node_page_state(NR_WRITEBACK_TEMP));
|
||||
show_val_kb(m, "CommitLimit: ", vm_commit_limit());
|
||||
|
|
@ -151,7 +151,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
|||
#ifdef CONFIG_CMA
|
||||
show_val_kb(m, "CmaTotal: ", totalcma_pages);
|
||||
show_val_kb(m, "CmaFree: ",
|
||||
global_page_state(NR_FREE_CMA_PAGES));
|
||||
global_zone_page_state(NR_FREE_CMA_PAGES));
|
||||
#endif
|
||||
|
||||
hugetlb_report_meminfo(m);
|
||||
|
|
|
|||
Loading…
Reference in a new issue