public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Misc freespace cache cleanups
@ 2021-11-23 12:44 Nikolay Borisov
  2021-11-23 12:44 ` [PATCH 1/4] btrfs: consolidate bitmap_clear_bits/__bitmap_clear_bits Nikolay Borisov
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Nikolay Borisov @ 2021-11-23 12:44 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

Here's an assortment of freespace cache cleanups. 2 patches to consolidated some 
functions and 2 other to simplify/clarify arguments of called functions. This 
all results in a nice reduction of lines of code as well as code size: 

$./scripts/bloat-o-meter fs/btrfs/free-space-cache.o free-space-cache.patched
add/remove: 0/0 grow/shrink: 0/8 up/down: 0/-549 (-549)
Function                                     old     new   delta
__btrfs_add_free_space                      1124    1123      -1
btrfs_find_space_for_alloc                  1042    1039      -3
btrfs_remove_free_space                      648     644      -4
do_trimming                                  550     530     -20
btrfs_add_free_space                          75      55     -20
btrfs_add_free_space_async_trimmed            79      57     -22
try_merge_free_space                         602     505     -97
steal_from_bitmap                           1522    1140    -382
Total: Before=29299, After=28750, chg -1.87%


Nikolay Borisov (4):
  btrfs: consolidate bitmap_clear_bits/__bitmap_clear_bits
  btrfs: consolidate unlink_free_space/__unlink_free_space functions
  btrfs: make __btrfs_add_free_space take just block group reference
  btrfs: change name and type of private member of btrfs_free_space_ctl

 fs/btrfs/free-space-cache.c | 115 ++++++++++++++----------------------
 fs/btrfs/free-space-cache.h |   8 +--
 2 files changed, 48 insertions(+), 75 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2021-11-23 20:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-23 12:44 [PATCH 0/4] Misc freespace cache cleanups Nikolay Borisov
2021-11-23 12:44 ` [PATCH 1/4] btrfs: consolidate bitmap_clear_bits/__bitmap_clear_bits Nikolay Borisov
2021-11-23 12:44 ` [PATCH 2/4] btrfs: consolidate unlink_free_space/__unlink_free_space functions Nikolay Borisov
2021-11-23 12:44 ` [PATCH 3/4] btrfs: make __btrfs_add_free_space take just block group reference Nikolay Borisov
2021-11-23 12:44 ` [PATCH 4/4] btrfs: change name and type of private member of btrfs_free_space_ctl Nikolay Borisov
2021-11-23 20:39 ` [PATCH 0/4] Misc freespace cache cleanups David Sterba

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