Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 0/3] Improve btrfs llseek implementation
Date: Thu, 26 Sep 2019 14:39:50 +0300	[thread overview]
Message-ID: <20190926113953.19569-1-nborisov@suse.com> (raw)

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


             reply	other threads:[~2019-09-26 11:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 11:39 Nikolay Borisov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190926113953.19569-1-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox