mbox series

[0/6] btrfs: optimize btree insertions and some cleanups

Message ID cover.1638440535.git.fdmanana@suse.com (mailing list archive)
Headers show
Series btrfs: optimize btree insertions and some cleanups | expand

Message

Filipe Manana Dec. 2, 2021, 10:30 a.m. UTC
From: Filipe Manana <fdmanana@suse.com>

This patchset optimizes btree insertions to allow better parallelism, by
having insertions unlocking upper level nodes sooner and avoid blocking
other tasks, or reduce the time they are blocked, that want to use the
same nodes. The optimization is in patch 2/6, patch 1/6 is preparation
for it, and the rest are just cleanups or removing stale code and comments.

Filipe Manana (6):
  btrfs: allow generic_bin_search() to take low boundary as an argument
  btrfs: try to unlock parent nodes earlier when inserting a key
  btrfs: remove useless condition check before splitting leaf
  btrfs: move leaf search logic out of btrfs_search_slot()
  btrfs: remove BUG_ON() after splitting leaf
  btrfs: remove stale comment about locking at btrfs_search_slot()

 fs/btrfs/ctree.c | 254 +++++++++++++++++++++++++++++++++--------------
 1 file changed, 181 insertions(+), 73 deletions(-)

Comments

Josef Bacik Dec. 2, 2021, 7:45 p.m. UTC | #1
On Thu, Dec 02, 2021 at 10:30:34AM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> This patchset optimizes btree insertions to allow better parallelism, by
> having insertions unlocking upper level nodes sooner and avoid blocking
> other tasks, or reduce the time they are blocked, that want to use the
> same nodes. The optimization is in patch 2/6, patch 1/6 is preparation
> for it, and the rest are just cleanups or removing stale code and comments.
> 
> Filipe Manana (6):
>   btrfs: allow generic_bin_search() to take low boundary as an argument
>   btrfs: try to unlock parent nodes earlier when inserting a key
>   btrfs: remove useless condition check before splitting leaf
>   btrfs: move leaf search logic out of btrfs_search_slot()
>   btrfs: remove BUG_ON() after splitting leaf
>   btrfs: remove stale comment about locking at btrfs_search_slot()
> 
>  fs/btrfs/ctree.c | 254 +++++++++++++++++++++++++++++++++--------------
>  1 file changed, 181 insertions(+), 73 deletions(-)
> 
> -- 
> 2.33.0

You can add

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

to the series, thanks,

Josef
David Sterba Dec. 6, 2021, 6:29 p.m. UTC | #2
On Thu, Dec 02, 2021 at 10:30:34AM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> This patchset optimizes btree insertions to allow better parallelism, by
> having insertions unlocking upper level nodes sooner and avoid blocking
> other tasks, or reduce the time they are blocked, that want to use the
> same nodes. The optimization is in patch 2/6, patch 1/6 is preparation
> for it, and the rest are just cleanups or removing stale code and comments.
> 
> Filipe Manana (6):
>   btrfs: allow generic_bin_search() to take low boundary as an argument
>   btrfs: try to unlock parent nodes earlier when inserting a key
>   btrfs: remove useless condition check before splitting leaf
>   btrfs: move leaf search logic out of btrfs_search_slot()
>   btrfs: remove BUG_ON() after splitting leaf
>   btrfs: remove stale comment about locking at btrfs_search_slot()

Added to misc-next, thanks.