android_kernel_google_msm/drivers/base
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
..
power wakeup: disable msm_hsic_host wakelock knob per default 2019-02-27 16:21:42 +01:00
regmap regmap: debugfs: Don't bother actually printing when calculating max length 2016-04-27 18:55:23 +08:00
attribute_container.c
base.h drivers: Resurrect sysdev 2013-02-25 11:29:18 -08:00
bus.c driver core: Fix unbalanced device reference in drivers_probe 2015-04-14 17:33:41 +08:00
class.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
core.c driver-core: Use kobj_to_dev instead of re-implementing it 2017-12-28 12:56:47 +03:00
cpu.c Merge 3.3-rc6 into driver-core-next 2012-03-09 12:35:53 -08:00
dd.c drivercore: deferral race condition fix 2014-06-07 16:02:01 -07:00
devres.c driver core: devres: introduce devres_for_each_res 2017-12-28 12:57:11 +03:00
devtmpfs.c new helper: done_path_create() 2018-12-07 22:28:48 +04:00
dma-buf.c dma-buf: mmap support 2012-05-22 14:01:06 -07:00
dma-coherent.c common: add dma_mmap_from_coherent() function 2013-02-27 18:21:21 -08:00
dma-contiguous.c mm: Fix incorrect type conversion for size during dma allocation 2018-02-16 20:15:05 -07:00
dma-mapping.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
driver.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-03-21 18:55:10 -07:00
firmware.c
firmware_class.c firmware_class: make firmware caching configurable 2017-12-28 12:57:38 +03:00
genlock.c Update copyright to The Linux Foundation 2013-03-15 17:07:39 -07:00
hypervisor.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
init.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
isa.c
Kconfig firmware_class: make firmware caching configurable 2017-12-28 12:57:38 +03:00
Makefile drivers: add Contiguous Memory Allocator 2013-02-27 18:14:15 -08:00
map.c
memory.c drivers/base/memory.c: fix show_mem_removable() to handle missing sections 2013-09-07 21:58:14 -07:00
module.c
node.c mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces 2020-12-01 19:08:36 +01:00
platform.c drivercore: Fix unregistration path of platform devices 2016-04-27 18:55:16 +08:00
soc.c drivers/base: fix compiler warning in SoC export driver - idr should be ida 2012-04-09 14:54:22 -07:00
sw_sync.c sw_sync: convert to new value_str debug ops 2013-03-04 12:47:44 -08:00
sync.c sync: Fix a race condition between release_obj and print_obj 2013-12-09 16:11:59 -08:00
sys.c drivers: Resurrect sysdev 2013-02-25 11:29:18 -08:00
syscore.c PM: wakeup_reason: correctly deduce wakeup interrupts 2017-10-15 17:05:07 +03:00
topology.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
transport_class.c drivers/base: transport_class explicitly requires EXPORT_SYMBOL 2011-10-31 19:31:15 -04:00