Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memcg: more mem_cgroup_uncharge() batching

It seems odd that truncate_inode_pages_range(), called not only when
truncating but also when evicting inodes, has mem_cgroup_uncharge_start
and _end() batching in its second loop to clear up a few leftovers, but
not in its first loop that does almost all the work: add them there too.

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Hugh Dickins and committed by
Linus Torvalds
e5598f8b 8eac563c

+2
+2
mm/truncate.c
··· 225 225 next = start; 226 226 while (next <= end && 227 227 pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) { 228 + mem_cgroup_uncharge_start(); 228 229 for (i = 0; i < pagevec_count(&pvec); i++) { 229 230 struct page *page = pvec.pages[i]; 230 231 pgoff_t page_index = page->index; ··· 248 247 unlock_page(page); 249 248 } 250 249 pagevec_release(&pvec); 250 + mem_cgroup_uncharge_end(); 251 251 cond_resched(); 252 252 } 253 253