Merge branch 'akpm' (patches from Andrew)
Merge updates from Andrew Morton:
"A large amount of MM, plenty more to come.
Subsystems affected by this patch series:
- tools
- kthread
- kbuild
- scripts
- ocfs2
- vfs
- mm: slub, kmemleak, pagecache, gup, swap, memcg, pagemap, mremap,
sparsemem, kasan, pagealloc, vmscan, compaction, mempolicy,
hugetlbfs, hugetlb"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (155 commits)
include/linux/huge_mm.h: check PageTail in hpage_nr_pages even when !THP
mm/hugetlb: fix build failure with HUGETLB_PAGE but not HUGEBTLBFS
selftests/vm: fix map_hugetlb length used for testing read and write
mm/hugetlb: remove unnecessary memory fetch in PageHeadHuge()
mm/hugetlb.c: clean code by removing unnecessary initialization
hugetlb_cgroup: add hugetlb_cgroup reservation docs
hugetlb_cgroup: add hugetlb_cgroup reservation tests
hugetlb: support file_region coalescing again
hugetlb_cgroup: support noreserve mappings
hugetlb_cgroup: add accounting for shared mappings
hugetlb: disable region_add file_region coalescing
hugetlb_cgroup: add reservation accounting for private mappings
mm/hugetlb_cgroup: fix hugetlb_cgroup migration
hugetlb_cgroup: add interface for charge/uncharge hugetlb reservations
hugetlb_cgroup: add hugetlb_cgroup reservation counter
hugetlbfs: Use i_mmap_rwsem to address page fault/truncate race
hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization
mm/memblock.c: remove redundant assignment to variable max_addr
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
mm: mempolicy: use VM_BUG_ON_VMA in queue_pages_test_walk()
...
This commit is contained in:
+5
-4
@@ -281,7 +281,7 @@ static inline void free_thread_stack(struct task_struct *tsk)
|
||||
MEMCG_KERNEL_STACK_KB,
|
||||
-(int)(PAGE_SIZE / 1024));
|
||||
|
||||
memcg_kmem_uncharge(vm->pages[i], 0);
|
||||
memcg_kmem_uncharge_page(vm->pages[i], 0);
|
||||
}
|
||||
|
||||
for (i = 0; i < NR_CACHED_STACKS; i++) {
|
||||
@@ -413,12 +413,13 @@ static int memcg_charge_kernel_stack(struct task_struct *tsk)
|
||||
|
||||
for (i = 0; i < THREAD_SIZE / PAGE_SIZE; i++) {
|
||||
/*
|
||||
* If memcg_kmem_charge() fails, page->mem_cgroup
|
||||
* pointer is NULL, and both memcg_kmem_uncharge()
|
||||
* If memcg_kmem_charge_page() fails, page->mem_cgroup
|
||||
* pointer is NULL, and both memcg_kmem_uncharge_page()
|
||||
* and mod_memcg_page_state() in free_thread_stack()
|
||||
* will ignore this page. So it's safe.
|
||||
*/
|
||||
ret = memcg_kmem_charge(vm->pages[i], GFP_KERNEL, 0);
|
||||
ret = memcg_kmem_charge_page(vm->pages[i], GFP_KERNEL,
|
||||
0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user