On Fri, Oct 09, 2020 at 09:28:19AM -0400, Josef Bacik wrote:
> 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 tracpoint 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 <[email protected]>
> Signed-off-by: Josef Bacik <[email protected]>
> ---
>  fs/btrfs/space-info.c        | 10 +++++++++-
>  include/trace/events/btrfs.h | 29 +++++++++++++++++++++++++++++
>  2 files changed, 38 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
> index ba2b72409d46..ac7269cf1904 100644
> --- a/fs/btrfs/space-info.c
> +++ b/fs/btrfs/space-info.c
> @@ -1224,6 +1224,7 @@ static void wait_reserve_ticket(struct btrfs_fs_info 
> *fs_info,
>  static int handle_reserve_ticket(struct btrfs_fs_info *fs_info,
>                                struct btrfs_space_info *space_info,
>                                struct reserve_ticket *ticket,
> +                              u64 start_ns, u64 orig_bytes,

Added

+ * @start_ns:   timestamp when the reservation started
+ * @orig_bytes: amount of bytes originally reserved

caught by the recently added kdoc verification.

>                                enum btrfs_reserve_flush_enum flush)

Reply via email to