Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] Improve btrfs llseek implementation
@ 2019-09-26 11:39 Nikolay Borisov
  2019-09-26 11:39 ` [PATCH 1/3] btrfs: Speed up btrfs_file_llseek Nikolay Borisov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nikolay Borisov @ 2019-09-26 11:39 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-09-26 18:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-26 11:39 [PATCH 0/3] Improve btrfs llseek implementation Nikolay Borisov
2019-09-26 11:39 ` [PATCH 1/3] btrfs: Speed up btrfs_file_llseek Nikolay Borisov
2019-09-26 18:27   ` Josef Bacik
2019-09-26 11:39 ` [PATCH 2/3] btrfs: Simplify btrfs_file_llseek Nikolay Borisov
2019-09-26 12:02   ` Johannes Thumshirn
2019-09-26 18:27   ` Josef Bacik
2019-09-26 11:39 ` [PATCH 3/3] btrfs: Return offset from find_desired_extent Nikolay Borisov
2019-09-26 12:04   ` Johannes Thumshirn
2019-09-26 18:28   ` Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox