diff options
author | Andres Lagar-Cavilla | 2016-05-20 02:12:47 +0200 |
---|---|---|
committer | Linus Torvalds | 2016-05-20 04:12:14 +0200 |
commit | 9e18eb29356b7dfd55183bd42cf73919d1590835 (patch) | |
tree | 7d40c6809e6755f18e6e00041511c536c03dc731 /net/phonet/sysctl.c | |
parent | tmpfs: preliminary minor tidyups (diff) | |
download | kernel-qcow2-linux-9e18eb29356b7dfd55183bd42cf73919d1590835.tar.gz kernel-qcow2-linux-9e18eb29356b7dfd55183bd42cf73919d1590835.tar.xz kernel-qcow2-linux-9e18eb29356b7dfd55183bd42cf73919d1590835.zip |
tmpfs: mem_cgroup charge fault to vm_mm not current mm
Although shmem_fault() has been careful to count a major fault to vm_mm,
shmem_getpage_gfp() has been careless in charging a remote access fault
to current->mm owner's memcg instead of to vma->vm_mm owner's memcg:
that is inconsistent with all the mem_cgroup charging on remote access
faults in mm/memory.c.
Fix it by passing fault_mm along with fault_type to
shmem_get_page_gfp(); but in that case, now knowing the right mm, it's
better for it to handle the PGMAJFAULT updates itself.
And let's keep this clutter out of most callers' way: change the common
shmem_getpage() wrapper to hide fault_mm and fault_type as well as gfp.
Signed-off-by: Andres Lagar-Cavilla <andreslc@google.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Cc: Yang Shi <yang.shi@linaro.org>
Cc: Ning Qu <quning@gmail.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/phonet/sysctl.c')
0 files changed, 0 insertions, 0 deletions