]> www.infradead.org Git - users/jedix/linux-maple.git/commit
delayacct: support re-entrance detection of thrashing accounting
authorYang Yang <yang.yang29@zte.com.cn>
Mon, 15 Aug 2022 07:11:35 +0000 (07:11 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Aug 2022 05:03:02 +0000 (22:03 -0700)
commit0110fc9db5168faf135e64b1b485272a051a7a29
tree02213cd2f91001797892aa9fdcfdbe534637925a
parent16b3b3b229c380a697ca39f6a92659ad1b982c68
delayacct: support re-entrance detection of thrashing accounting

Once upon a time, we only support accounting thrashing of page cache.
Then Joonsoo introduced workingset detection for anonymous pages and we
gained the ability to account thrashing of them[1].

For page cache thrashing accounting, there is no suitable place to do it
in fs level likes swap_readpage().  So we have to do it in
folio_wait_bit_common().

Then for anonymous pages thrashing accounting, we have to do it in both
swap_readpage() and folio_wait_bit_common().  This likes PSI, so we should
let thrashing accounting supports re-entrance detection.

This patch is to prepare complete thrashing accounting, and is based on
patch "filemap: make the accounting of thrashing more consistent".

[1] commit aae466b0052e ("mm/swap: implement workingset detection for anonymous LRU")

Link: https://lkml.kernel.org/r/20220815071134.74551-1-yang.yang29@zte.com.cn
Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Reviewed-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Reviewed-by: wangyong <wang.yong12@zte.com.cn>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/delayacct.h
include/linux/sched.h
kernel/delayacct.c
mm/filemap.c