public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs: basic refactor of btrfs_buffered_write()
Date: Mon, 24 Aug 2020 14:31:36 +0800	[thread overview]
Message-ID: <20200824063139.70880-1-wqu@suse.com> (raw)

This patchset will refactor btrfs_buffered_write() by:
- Extra the nrptrs calculation into one function
  The main concern here is the batch number of pages.
  Originally there is a max(nrptrs, 8), which looks so incorrect that my
  eyes change it to min(nrptrs, 8) automatically.

  This time we kill that max(nrptrr, 8), and replace it to a fixed size
  up limit (64K), which should bring the same performance for different
  page sized.

  The limit can be changed if the 64K is not large enough for certain
  buffered write.

- Refactor the main loop into process_one_batch()
  No functional change, just plain refactor.

- Remove the again: tag by integrating page and extent locking
  The new function lock_pages_and_extent() will handle the retry so we
  don't need the tag any more in the main loop.

Qu Wenruo (3):
  btrfs: change how we calculate the nrptrs for btrfs_buffered_write()
  btrfs: refactor btrfs_buffered_write() into process_one_batch()
  btrfs: remove the again: tag in process_one_batch()

 fs/btrfs/file.c | 568 +++++++++++++++++++++++++-----------------------
 1 file changed, 301 insertions(+), 267 deletions(-)

-- 
2.28.0


             reply	other threads:[~2020-08-24  6:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  6:31 Qu Wenruo [this message]
2020-08-24  6:31 ` [PATCH 1/3] btrfs: change how we calculate the nrptrs for btrfs_buffered_write() Qu Wenruo
2020-08-24  6:31 ` [PATCH 2/3] btrfs: refactor btrfs_buffered_write() into process_one_batch() Qu Wenruo
2020-08-24  6:31 ` [PATCH 3/3] btrfs: remove the again: tag in process_one_batch() Qu Wenruo

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=20200824063139.70880-1-wqu@suse.com \
    --to=wqu@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