linux/mm
Jerome Marchand eca56ff906 mm, shmem: add internal shmem resident memory accounting
Currently looking at /proc/<pid>/status or statm, there is no way to
distinguish shmem pages from pages mapped to a regular file (shmem pages
are mapped to /dev/zero), even though their implication in actual memory
use is quite different.

The internal accounting currently counts shmem pages together with
regular files.  As a preparation to extend the userspace interfaces,
this patch adds MM_SHMEMPAGES counter to mm_rss_stat to account for
shmem pages separately from MM_FILEPAGES.  The next patch will expose it
to userspace - this patch doesn't change the exported values yet, by
adding up MM_SHMEMPAGES to MM_FILEPAGES at places where MM_FILEPAGES was
used before.  The only user-visible change after this patch is the OOM
killer message that separates the reported "shmem-rss" from "file-rss".

[vbabka@suse.cz: forward-porting, tweak changelog]
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-14 16:00:49 -08:00
..
kasan
backing-dev.c mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress 2015-12-12 10:15:34 -08:00
balloon_compaction.c
bootmem.c
cleancache.c
cma_debug.c
cma.c
cma.h
compaction.c
debug-pagealloc.c
debug.c
dmapool.c
early_ioremap.c
fadvise.c
failslab.c
filemap.c
frame_vector.c
frontswap.c
gup.c
highmem.c
huge_memory.c
hugetlb_cgroup.c
hugetlb.c mm/hugetlb.c: fix resv map memory leak for placeholder entries 2015-12-12 10:15:34 -08:00
hwpoison-inject.c
init-mm.c
internal.h
interval_tree.c
Kconfig
Kconfig.debug
kmemcheck.c
kmemleak-test.c
kmemleak.c Revert "gfp: add __GFP_NOACCOUNT" 2016-01-14 16:00:49 -08:00
ksm.c
list_lru.c
maccess.c
madvise.c
Makefile
memblock.c mm/memblock.c: memblock_is_memory()/reserved() can be boolean 2016-01-14 16:00:49 -08:00
memcontrol.c slab: add SLAB_ACCOUNT flag 2016-01-14 16:00:49 -08:00
memory_hotplug.c mm/memory_hotplug.c: check for missing sections in test_pages_in_a_zone() 2015-12-29 17:45:49 -08:00
memory-failure.c
memory.c mm, shmem: add internal shmem resident memory accounting 2016-01-14 16:00:49 -08:00
mempolicy.c mm/mempolicy.c: convert the shared_policy lock to a rwlock 2016-01-14 16:00:49 -08:00
mempool.c
memtest.c
migrate.c
mincore.c
mlock.c mm/mlock.c: drop unneeded initialization in munlock_vma_pages_range() 2016-01-14 16:00:49 -08:00
mm_init.c
mmap.c mm/mmap.c: remove redundant local variables for may_expand_vm() 2016-01-14 16:00:49 -08:00
mmu_context.c
mmu_notifier.c
mmzone.c mm/mmzone.c: memmap_valid_within() can be boolean 2016-01-14 16:00:49 -08:00
mprotect.c
mremap.c x86/mm/pat: Add untrack_pfn_moved for mremap 2016-01-05 11:10:05 +01:00
msync.c
nobootmem.c
nommu.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
oom_kill.c mm, shmem: add internal shmem resident memory accounting 2016-01-14 16:00:49 -08:00
page_alloc.c mm/page_alloc.c: do not loop over ALLOC_NO_WATERMARKS without triggering reclaim 2016-01-14 16:00:49 -08:00
page_counter.c
page_ext.c
page_idle.c
page_io.c
page_isolation.c mm/page_isolation.c: add new tracepoint, test_pages_isolated 2016-01-14 16:00:49 -08:00
page_owner.c
page-writeback.c
pagewalk.c
percpu-km.c
percpu-vm.c
percpu.c
pgtable-generic.c
process_vm_access.c
quicklist.c
readahead.c
rmap.c mm, shmem: add internal shmem resident memory accounting 2016-01-14 16:00:49 -08:00
shmem.c mm, proc: reduce cost of /proc/pid/smaps for unpopulated shmem mappings 2016-01-14 16:00:49 -08:00
slab_common.c slab: add SLAB_ACCOUNT flag 2016-01-14 16:00:49 -08:00
slab.c mm/slab.c: add a helper function get_first_slab 2016-01-14 16:00:49 -08:00
slab.h slab: add SLAB_ACCOUNT flag 2016-01-14 16:00:49 -08:00
slob.c
slub.c slab: add SLAB_ACCOUNT flag 2016-01-14 16:00:49 -08:00
sparse-vmemmap.c
sparse.c
swap_cgroup.c
swap_state.c
swap.c
swapfile.c
truncate.c
userfaultfd.c
util.c new helper: memdup_user_nul() 2016-01-04 10:20:19 -05:00
vmacache.c
vmalloc.c mm/vmalloc.c: use list_{next,first}_entry 2016-01-14 16:00:49 -08:00
vmpressure.c
vmscan.c mm: change mm_vmscan_lru_shrink_inactive() proto types 2016-01-14 16:00:49 -08:00
vmstat.c vmstat: allocate vmstat_wq before it is used 2016-01-08 23:47:54 -08:00
workingset.c
zbud.c
zpool.c
zsmalloc.c
zswap.c mm/zswap: change incorrect strncmp use to strcmp 2015-12-18 14:25:40 -08:00