kernel-ark/fs/proc
Rafael Aquini cc7452b6dc 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.

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>
2014-08-06 18:01:19 -07:00
..
array.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2014-08-06 08:06:39 -07:00
base.c Merge git://git.infradead.org/users/eparis/audit 2014-04-12 12:38:53 -07:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
fd.c proc: show mnt_id in /proc/pid/fdinfo 2014-04-07 16:36:04 -07:00
fd.h
generic.c
inode.c fs/proc/inode.c: use RCU_INIT_POINTER(x, NULL) 2014-04-07 16:36:04 -07:00
internal.h
interrupts.c
Kconfig
kcore.c
kmsg.c
loadavg.c
Makefile
meminfo.c mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces 2014-08-06 18:01:19 -07:00
namespaces.c new helper: readlink_copy() 2014-04-01 23:19:15 -04:00
nommu.c
page.c
proc_net.c
proc_sysctl.c
proc_tty.c
root.c Major changes for 3.14 include support for the newly added ZERO_RANGE 2014-04-04 15:39:39 -07:00
self.c new helper: readlink_copy() 2014-04-01 23:19:15 -04:00
softirqs.c
stat.c /proc/stat: convert to single_open_size() 2014-07-03 09:21:54 -07:00
task_mmu.c Merge branch 'next' (accumulated 3.16 merge window patches) into master 2014-06-08 11:31:16 -07:00
task_nommu.c
uptime.c
version.c
vmcore.c fs/proc/vmcore.c: remove NULL assignment to static 2014-06-06 16:08:12 -07:00