summaryrefslogtreecommitdiff
path: root/include/linux/execmem.h
diff options
context:
space:
mode:
authorLeo Martins <loemra.dev@gmail.com>2026-02-26 12:51:08 +0300
committerDavid Sterba <dsterba@suse.com>2026-04-07 19:56:00 +0300
commitcc970d21c4f37b7cbedd73e043b69faf2c66a6fe (patch)
tree06d63a845dda044e4fbeded1c57b210460fbf505 /include/linux/execmem.h
parentf9a48549a15aa369d42cebc08a6a72b71a53d547 (diff)
downloadlinux-cc970d21c4f37b7cbedd73e043b69faf2c66a6fe.tar.xz
btrfs: add tracepoint for search slot restart tracking
Add a btrfs_search_slot_restart tracepoint that fires at each restart site in btrfs_search_slot(), recording the root, tree level, and reason for the restart. This enables tracking search slot restarts which contribute to COW amplification under memory pressure. The four restart reasons are: - write_lock: insufficient write lock level, need to restart with higher lock - setup_nodes: node setup returned -EAGAIN - slot_zero: insertion at slot 0 requires higher write lock level - read_block: read_block_for_search returned -EAGAIN (block not cached or lock contention) COW counts are already tracked by the existing trace_btrfs_cow_block() tracepoint. The per-restart-site tracepoint avoids counter overhead in the critical path when tracepoints are disabled, and provides richer per-event information that bpftrace scripts can aggregate into counts, histograms, and per-root breakdowns. Reviewed-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Leo Martins <loemra.dev@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/execmem.h')
0 files changed, 0 insertions, 0 deletions