All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Improve setup_items_for_insert
@ 2020-09-01 14:39 Nikolay Borisov
  2020-09-01 14:39 ` [PATCH 1/5] btrfs: Re-arrange statements in setup_items_for_insert Nikolay Borisov
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Nikolay Borisov @ 2020-09-01 14:39 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

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


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

end of thread, other threads:[~2020-09-11 15:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 14:39 [PATCH 0/5] Improve setup_items_for_insert Nikolay Borisov
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.