mbox series

[0/9] Extent tree search cleanups

Message ID cover.1654706034.git.dsterba@suse.com (mailing list archive)
Headers show
Series Extent tree search cleanups | expand

Message

David Sterba June 8, 2022, 4:43 p.m. UTC
The extent_io_tree search helpers take return parameters and many
callers pass just NULL, which are checked and add a conditionals to some
paths. Reorganize helpers to suit what callers need and drop unnecessary
parameters, open code rbtree search loops and clean up some other
parameters.

This could improve performance in some cases but it's mostly micro
optimizations and I haven't done any measurements.

David Sterba (9):
  btrfs: open code rbtree search into split_state
  btrfs: open code rbtree search in insert_state
  btrfs: lift start and end parameters to callers of insert_state
  btrfs: pass bits by value not pointer for extent_state helpers
  btrfs: add fast path for extent_state insertion
  btrfs: remove node and parent parameters from insert_state
  btrfs: open code inexact rbtree search in tree_search
  btrfs: make tree search for insert more generic and use it for
    tree_search
  btrfs: unify tree search helper returning prev and next nodes

 fs/btrfs/ctree.h     |   4 +-
 fs/btrfs/extent_io.c | 316 +++++++++++++++++++++++--------------------
 fs/btrfs/inode.c     |  24 ++--
 3 files changed, 183 insertions(+), 161 deletions(-)

Comments

David Sterba June 15, 2022, 11:19 a.m. UTC | #1
On Wed, Jun 08, 2022 at 06:43:19PM +0200, David Sterba wrote:
> The extent_io_tree search helpers take return parameters and many
> callers pass just NULL, which are checked and add a conditionals to some
> paths. Reorganize helpers to suit what callers need and drop unnecessary
> parameters, open code rbtree search loops and clean up some other
> parameters.
> 
> This could improve performance in some cases but it's mostly micro
> optimizations and I haven't done any measurements.
> 
> David Sterba (9):
>   btrfs: open code rbtree search into split_state
>   btrfs: open code rbtree search in insert_state
>   btrfs: lift start and end parameters to callers of insert_state
>   btrfs: pass bits by value not pointer for extent_state helpers
>   btrfs: add fast path for extent_state insertion
>   btrfs: remove node and parent parameters from insert_state
>   btrfs: open code inexact rbtree search in tree_search
>   btrfs: make tree search for insert more generic and use it for
>     tree_search
>   btrfs: unify tree search helper returning prev and next nodes

Added to misc-next.