All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/19] Set/get helpers speedups and cleanups
@ 2020-05-07 20:19 David Sterba
  2020-05-07 20:19 ` [PATCH 01/19] btrfs: use the token::eb for all set/get helpers David Sterba
                   ` (18 more replies)
  0 siblings, 19 replies; 44+ messages in thread
From: David Sterba @ 2020-05-07 20:19 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

Set/get helpers are all the functions that read or write b-tree item
members, like btrfs_device_type, btrfs_set_device_type, or the variants
with token btrfs_token_device_type, defined in ctree.h with
BTRFS_SETGET_FUNCS. Most of them are implemented by btrfs_get_8/16/32/64
and btrfs_set_8/16/32/64 functions.

The helpers are used all over the place and can be seen in perf top
results quite often, though it's about 0.5-1.5%. This series simplifies
the helpers and removes function calls that do the translation from/to
the input buffers to/from the extent buffer pages.

I don't have exact number to show the speedup, watching perf top and the
same workload at least does not point to a drop, the functions are still
in the overall range 0.5-1.5%. The code cleanups result in a
straightforward code, also map_private_extent_buffer is gone!!!

David Sterba (19):
  btrfs: use the token::eb for all set/get helpers
  btrfs: drop eb parameter from set/get token helpers
  btrfs: don't use set/get token for single assignment in overwrite_item
  btrfs: don't use set/get token in leaf_space_used
  btrfs: preset set/get token with first page and drop condition
  btrfs: add separate bounds checker for set/get helpers
  btrfs: speed up btrfs_get_##bits helpers
  btrfs: speed up btrfs_get_token_##bits helpers
  btrfs: speed up btrfs_set_##bits helpers
  btrfs: speed up btrfs_set_token_##bits helpers
  btrfs: speed up and simplify generic_bin_search
  btrfs: remove unused map_private_extent_buffer
  btrfs: constify extent_buffer in the API functions
  btrfs: drop unnecessary offset_in_page in extent buffer helpers
  btrfs: optimize split page read in btrfs_get_##bits
  btrfs: optimize split page read in btrfs_get_token_##bits
  btrfs: optimize split page write in btrfs_set_##bits
  btrfs: optimize split page write in btrfs_set_token_##bits
  btrfs: update documentation of set/get helpers

 fs/btrfs/ctree.c        |  98 +++++++-----------
 fs/btrfs/ctree.h        |  58 +++++------
 fs/btrfs/extent_io.c    | 137 ++++++++-----------------
 fs/btrfs/extent_io.h    |  48 ++++-----
 fs/btrfs/inode.c        |  71 ++++++-------
 fs/btrfs/struct-funcs.c | 222 ++++++++++++++++++++--------------------
 fs/btrfs/tree-log.c     | 130 +++++++++++------------
 7 files changed, 337 insertions(+), 427 deletions(-)

-- 
2.25.0


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

end of thread, other threads:[~2020-05-11 14:41 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 20:19 [PATCH 00/19] Set/get helpers speedups and cleanups David Sterba
2020-05-07 20:19 ` [PATCH 01/19] btrfs: use the token::eb for all set/get helpers David Sterba
2020-05-08 12:05   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 02/19] btrfs: drop eb parameter from set/get token helpers David Sterba
2020-05-08 12:09   ` Johannes Thumshirn
2020-05-11 13:02     ` David Sterba
2020-05-11 14:41       ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 03/19] btrfs: don't use set/get token for single assignment in overwrite_item David Sterba
2020-05-08 13:25   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 04/19] btrfs: don't use set/get token in leaf_space_used David Sterba
2020-05-08 13:27   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 05/19] btrfs: preset set/get token with first page and drop condition David Sterba
2020-05-08 13:37   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 06/19] btrfs: add separate bounds checker for set/get helpers David Sterba
2020-05-08 13:39   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 07/19] btrfs: speed up btrfs_get_##bits helpers David Sterba
2020-05-08 13:42   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 08/19] btrfs: speed up btrfs_get_token_##bits helpers David Sterba
2020-05-08 13:46   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 09/19] btrfs: speed up btrfs_set_##bits helpers David Sterba
2020-05-08 13:48   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 10/19] btrfs: speed up btrfs_set_token_##bits helpers David Sterba
2020-05-08 13:50   ` Johannes Thumshirn
2020-05-11 13:17     ` David Sterba
2020-05-07 20:19 ` [PATCH 11/19] btrfs: speed up and simplify generic_bin_search David Sterba
2020-05-08 14:04   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 12/19] btrfs: remove unused map_private_extent_buffer David Sterba
2020-05-08 14:05   ` Johannes Thumshirn
2020-05-07 20:19 ` [PATCH 13/19] btrfs: constify extent_buffer in the API functions David Sterba
2020-05-08 14:07   ` Johannes Thumshirn
2020-05-07 20:20 ` [PATCH 14/19] btrfs: drop unnecessary offset_in_page in extent buffer helpers David Sterba
2020-05-08 14:13   ` Johannes Thumshirn
2020-05-07 20:20 ` [PATCH 15/19] btrfs: optimize split page read in btrfs_get_##bits David Sterba
2020-05-08 14:17   ` Johannes Thumshirn
2020-05-07 20:20 ` [PATCH 16/19] btrfs: optimize split page read in btrfs_get_token_##bits David Sterba
2020-05-08 14:18   ` Johannes Thumshirn
2020-05-07 20:20 ` [PATCH 17/19] btrfs: optimize split page write in btrfs_set_##bits David Sterba
2020-05-08 14:20   ` Johannes Thumshirn
2020-05-07 20:20 ` [PATCH 18/19] btrfs: optimize split page write in btrfs_set_token_##bits David Sterba
2020-05-08 14:21   ` Johannes Thumshirn
2020-05-07 20:20 ` [PATCH 19/19] btrfs: update documentation of set/get helpers David Sterba
2020-05-07 21:33   ` Nikolay Borisov
2020-05-11 13:10     ` David Sterba
2020-05-11 14:16       ` Nikolay Borisov

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.