public inbox for linux-btrfs@vger.kernel.org
 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/5] Improve setup_items_for_insert
Date: Tue,  1 Sep 2020 17:39:56 +0300	[thread overview]
Message-ID: <20200901144001.4265-1-nborisov@suse.com> (raw)

here is a series to improve setup_items_for_insert. First patch is a simple
re-arranegement of statements to eliminate a duplication of calculation.
Patches 2 and 3 improve leaky interface of setup_items_for_insert as they
convey information about the function's implementation. Patch 4 adds a proper
kernel doc. Finally, patch 5 improves the error message in an exceptional
condition. As an added bonus after applying the whole series bloat-o-meter
output looks like:

add/remove: 0/0 grow/shrink: 1/7 up/down: 33/-99 (-66)
Function                                     old     new   delta
setup_items_for_insert                      1200    1233     +33
insert_extent                                448     445      -3
btrfs_duplicate_item                         260     254      -6
test_btrfs_split_item                       1784    1776      -8
insert_inode_item_key                        156     148      -8
__btrfs_drop_extents                        3637    3621     -16
btrfs_insert_delayed_items                  1153    1125     -28
btrfs_insert_empty_items                     177     147     -30
Total: Before=1113157, After=1113091, chg -0.01%

This has survived -g quick of xfstests

Nikolay Borisov (5):
  btrfs: Re-arrange statements in setup_items_for_insert
  btrfs: Eliminate total_size parameter from setup_items_for_insert
  btrfs: Sink total_data parameter in setup_items_for_insert
  btrfs: Add kerneldoc for setup_items_for_insert
  btrfs: improve error message in setup_items_for_insert

 fs/btrfs/ctree.c                     | 35 +++++++++++++++++-----------
 fs/btrfs/ctree.h                     |  2 +-
 fs/btrfs/delayed-inode.c             |  3 +--
 fs/btrfs/file.c                      |  6 +----
 fs/btrfs/tests/extent-buffer-tests.c |  3 +--
 fs/btrfs/tests/inode-tests.c         |  6 ++---
 6 files changed, 28 insertions(+), 27 deletions(-)

--
2.17.1


             reply	other threads:[~2020-09-01 14:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 14:39 Nikolay Borisov [this message]
2020-09-01 14:39 ` [PATCH 1/5] btrfs: Re-arrange statements in setup_items_for_insert Nikolay Borisov
2020-09-01 19:13   ` Josef Bacik
2020-09-01 14:39 ` [PATCH 2/5] btrfs: Eliminate total_size parameter from setup_items_for_insert Nikolay Borisov
2020-09-01 19:18   ` Josef Bacik
2020-09-01 14:39 ` [PATCH 3/5] btrfs: Sink total_data parameter in setup_items_for_insert Nikolay Borisov
2020-09-01 19:21   ` Josef Bacik
2020-09-01 14:40 ` [PATCH 4/5] btrfs: Add kerneldoc for setup_items_for_insert Nikolay Borisov
2020-09-01 19:22   ` Josef Bacik
2020-09-01 14:40 ` [PATCH 5/5] btrfs: improve error message in setup_items_for_insert Nikolay Borisov
2020-09-01 19:23   ` Josef Bacik
2020-09-10 16:14   ` David Sterba
2020-09-11 14:50   ` David Sterba
2020-09-02 10:39 ` [PATCH 0/5] Improve setup_items_for_insert Johannes Thumshirn
2020-09-10 16:16 ` David Sterba

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=20200901144001.4265-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