]> git.baikalelectronics.ru Git - kernel.git/commit
delayacct: support swapin delay accounting for swapping without blkio
authorYang Yang <yang.yang29@zte.com.cn>
Thu, 20 Jan 2022 02:10:02 +0000 (18:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Jan 2022 06:52:55 +0000 (08:52 +0200)
commit7a908c98c0ddd38f52c5acf3984949054e1a5be1
tree4aa83c6a0edc2f7cfee7707ac32ae8f1e36c2659
parent3a7caaa35b6c91de070c4a49e13a6dd902fa802a
delayacct: support swapin delay accounting for swapping without blkio

Currently delayacct accounts swapin delay only for swapping that cause
blkio.  If we use zram for swapping, tools/accounting/getdelays can't
get any SWAP delay.

It's useful to get zram swapin delay information, for example to adjust
compress algorithm or /proc/sys/vm/swappiness.

Reference to PSI, it accounts any kind of swapping by doing its work in
swap_readpage(), no matter whether swapping causes blkio.  Let delayacct
do the similar work.

Link: https://lkml.kernel.org/r/20211112083813.8559-1-yang.yang29@zte.com.cn
Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
Reported-by: Zeal Robot <zealci@zte.com.cn>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/delayacct.h
kernel/delayacct.c
mm/memory.c
mm/page_io.c