[PATCH 0/3] Improve btrfs llseek implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series aims to speed up and refactor btrfs_file_llseek. This is realized 
thanks to the fact there is no need to hold the inode locked when modifying the 
cursors of an opened file descriptor.

Patch 1 implements that and it results in around ~85% performance improvement
on a synthethic, fseek-heavy workload. Details on why this is safe are in the
patch's changelog alongside benchmarking information. 

Patch 2 streamlines btrfs_file_llseek and makes it similar to its counterparts
in ext4/xfs. Main change is that the 'out' label in the function is removed 
and the SEEK_END/SEEK_CUR are handled in the 'default' case. 

Patch 3 refactors find_desired_extent with the main goal of returning the found
offset as a function return value rather than into a pointer parameter.

This series survived xfstest.

Nikolay Borisov (3):
  btrfs: Speed up btrfs_file_llseek
  btrfs: Simplify btrfs_file_llseek
  btrfs: Return offset from find_desired_extent

 fs/btrfs/file.c | 58 ++++++++++++++++++++++---------------------------
 1 file changed, 26 insertions(+), 32 deletions(-)

-- 
2.17.1




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux