aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndres Lagar-Cavilla <[email protected]>2016-05-19 17:12:47 -0700
committerLinus Torvalds <[email protected]>2016-05-19 19:12:14 -0700
commit9e18eb29356b7dfd55183bd42cf73919d1590835 (patch)
tree7d40c6809e6755f18e6e00041511c536c03dc731 /include/linux
parent75edd345e8ede51bc8f00672feff5d622f2b3af6 (diff)
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 <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Andres Lagar-Cavilla <[email protected]> Cc: Yang Shi <[email protected]> Cc: Ning Qu <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions