android_kernel_google_msm/fs/proc
Rafael Aquini 29af476bb5 mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces
Historically, we exported shared pages to userspace via sysinfo(2)
sharedram and /proc/meminfo's "MemShared" fields.  With the advent of
tmpfs, from kernel v2.4 onward, that old way for accounting shared mem
was deemed inaccurate and we started to export a hard-coded 0 for
sysinfo.sharedram.  Later on, during the 2.6 timeframe, "MemShared" got
re-introduced to /proc/meminfo re-branded as "Shmem", but we're still
reporting sysinfo.sharedmem as that old hard-coded zero, which makes the
"shared memory" report inconsistent across interfaces.

This patch leverages the addition of explicit accounting for pages used
by shmem/tmpfs -- "4b02108 mm: oom analysis: add shmem vmstat" -- in
order to make the users of sysinfo(2) and si_meminfo*() friends aware of
that vmstat entry and make them report it consistently across the
interfaces, as well to make sysinfo(2) returned data consistent with our
current API documentation states.

Change-Id: I51474973cc267ee368352e96e7229e0101f38aca
Signed-off-by: Rafael Aquini <aquini@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-12-01 19:08:36 +01:00
..
Kconfig
Makefile
array.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
base.c fs: add nd_jump_link 2018-12-07 22:28:48 +04:00
cmdline.c proc: Remove additional SafetyNet flags from /proc/cmdline 2020-11-19 12:06:44 +01:00
consoles.c
cpuinfo.c
devices.c
generic.c stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
inode.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
internal.h stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
interrupts.c
kcore.c
kmsg.c
loadavg.c
meminfo.c mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces 2020-12-01 19:08:36 +01:00
mmu.c
namespaces.c proc: Use nd_jump_link in proc_ns_follow_link 2018-12-07 22:28:48 +04:00
nommu.c
page.c
proc_devtree.c
proc_net.c stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
proc_sysctl.c stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
proc_tty.c
root.c fs: push sync_filesystem() down to the file system's remount_fs() 2020-11-19 11:23:46 +01:00
softirqs.c
stat.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
task_mmu.c BACKPORT: mm: /proc/pid/smaps:: show proportional swap share of the mapping 2017-12-27 22:48:40 +03:00
task_nommu.c
uptime.c
version.c
vmcore.c