Skip to content
  • Josef Bacik's avatar
    Btrfs: track transid for delayed ref flushing · 31b9655f
    Josef Bacik authored
    
    
    Using the offwakecputime bpf script I noticed most of our time was spent waiting
    on the delayed ref throttling.  This is what is supposed to happen, but
    sometimes the transaction can commit and then we're waiting for throttling that
    doesn't matter anymore.  So change this stuff to be a little smarter by tracking
    the transid we were in when we initiated the throttling.  If the transaction we
    get is different then we can just bail out.  This resulted in a 50% speedup in
    my fs_mark test, and reduced the amount of time spent throttling by 60 seconds
    over the entire run (which is about 30 minutes).  Thanks,
    
    Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    31b9655f