]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add a trace point for reserve tickets
authorJosef Bacik <josef@toxicpanda.com>
Fri, 9 Oct 2020 13:28:19 +0000 (09:28 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Feb 2021 21:58:58 +0000 (22:58 +0100)
commit69de0355bae6f369fad5922026ed1d263792cf45
treedab384f192cb229fcbe3929615fb502cb2debc63
parent20f5f1517a3cb862c374d635d80dee0a2f24feb9
btrfs: add a trace point for reserve tickets

While debugging a ENOSPC related performance problem I needed to see the
time difference between start and end of a reserve ticket, so add a
trace point to report when we handle a reserve ticket.

I opted to spit out start_ns itself without calculating the difference
because there could be a gap between enabling the tracepoint and setting
start_ns.  Doing it this way allows us to filter on 0 start_ns so we
don't get bogus entries, and we can easily calculate the time difference
with bpftrace or something else.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c
include/trace/events/btrfs.h