]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
f2fs: add lock elapsed time trace facility for f2fs rwsemphore
authorChao Yu <chao@kernel.org>
Sun, 4 Jan 2026 02:07:16 +0000 (10:07 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 7 Jan 2026 03:17:06 +0000 (03:17 +0000)
commit79b3cebc70fcadf914d3ad1ae59d59cc62a47c46
treed78bb68cbe94382b414263bc4859e104a25309aa
parent7ec199117c32543e0fa8787a6eedd9126523a8d4
f2fs: add lock elapsed time trace facility for f2fs rwsemphore

This patch adds lock elapsed time trace facility for f2fs rwsemphore.

If total elapsed time of critical region covered by lock exceeds a
threshold, it will print tracepoint to dump information of lock related
context, including:
- thread information
- CPU/IO priority
- lock information
- elapsed time
 - total time
 - running time (depend on CONFIG_64BIT)
 - runnable time (depend on CONFIG_SCHED_INFO and CONFIG_SCHEDSTATS)
 - io sleep time (depend on CONFIG_TASK_DELAY_ACCT and
  /proc/sys/kernel/task_delayacct)
 - other time    (by default other time will account nonio sleep time,
                  but, if above kconfig is not defined, other time will
                  include runnable time and/or io sleep time as wll)

output:
    f2fs_lock_elapsed_time: dev = (254,52), comm: sh, pid: 13855, prio: 120, ioprio_class: 2, ioprio_data: 4, lock_name: cp_rwsem, lock_type: rlock, total: 1000, running: 993, runnable: 2, io_sleep: 0, other: 5

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
include/trace/events/f2fs.h