Message ID | 1588922717-63697-2-git-send-email-feng.tang@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | make vm_committed_as_batch aware of vm overcommit policy | expand |
On Fri 08-05-20 15:25:15, Feng Tang wrote: > Use the existing vm_memory_committed() instead, which is also > convenient for future change. > > Signed-off-by: Feng Tang <feng.tang@intel.com> Acked-by: Michal Hocko <mhocko@suse.com> > --- > fs/proc/meminfo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c > index 8c1f1bb..578c0b8 100644 > --- a/fs/proc/meminfo.c > +++ b/fs/proc/meminfo.c > @@ -42,7 +42,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v) > > si_meminfo(&i); > si_swapinfo(&i); > - committed = percpu_counter_read_positive(&vm_committed_as); > + committed = vm_memory_committed(); > > cached = global_node_page_state(NR_FILE_PAGES) - > total_swapcache_pages() - i.bufferram; > -- > 2.7.4
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c index 8c1f1bb..578c0b8 100644 --- a/fs/proc/meminfo.c +++ b/fs/proc/meminfo.c @@ -42,7 +42,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v) si_meminfo(&i); si_swapinfo(&i); - committed = percpu_counter_read_positive(&vm_committed_as); + committed = vm_memory_committed(); cached = global_node_page_state(NR_FILE_PAGES) - total_swapcache_pages() - i.bufferram;
Use the existing vm_memory_committed() instead, which is also convenient for future change. Signed-off-by: Feng Tang <feng.tang@intel.com> --- fs/proc/meminfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)