linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Btrfs: if else cleanups
@ 2017-06-07  0:58 Timofey Titovets
  2017-06-07  0:58 ` [PATCH 1/7] Btrfs: __compare_inode_defrag decrease max compare count Timofey Titovets
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Timofey Titovets @ 2017-06-07  0:58 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Timofey Titovets

Most of patches regroup if else logic
in attemp to avoid useless checks

Last patch convert if else to switch case,
because in that place code work with enum
and usage of switch case can make more obvious
to compiler how to optimize that code

This is if else vs case in GCC C++,
but i think gcc do the same with C.
https://godbolt.org/g/YzPL93

Timofey Titovets (7):
  Btrfs: __compare_inode_defrag decrease max compare count
  Btrfs: backref_comp decrease max compare count
  Btrfs: ref_node_cmp decrease max compare count
  Btrfs: ref_tree_add remove useless compare
  Btrfs: add_all_parents skip compare
  Btrfs: __tree_mod_log_insert decrease max compare count
  Btrfs: end_workqueue_bio use switch case instead of else if

 fs/btrfs/backref.c | 36 ++++++++++++++++++++----------------
 fs/btrfs/ctree.c   | 20 +++++++++++---------
 fs/btrfs/disk-io.c | 17 +++++++++++++----
 fs/btrfs/file.c    | 17 +++++++++--------
 fs/btrfs/inode.c   | 21 ++++++++++++---------
 5 files changed, 65 insertions(+), 46 deletions(-)

--
2.13.0

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

end of thread, other threads:[~2017-06-13 14:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-07  0:58 [PATCH 0/7] Btrfs: if else cleanups Timofey Titovets
2017-06-07  0:58 ` [PATCH 1/7] Btrfs: __compare_inode_defrag decrease max compare count Timofey Titovets
2017-06-07  0:58 ` [PATCH 2/7] Btrfs: backref_comp " Timofey Titovets
2017-06-07  0:58 ` [PATCH 3/7] Btrfs: ref_node_cmp " Timofey Titovets
2017-06-07  0:58 ` [PATCH 4/7] Btrfs: ref_tree_add remove useless compare Timofey Titovets
2017-06-07  0:58 ` [PATCH 5/7] Btrfs: add_all_parents skip compare Timofey Titovets
2017-06-07  0:58 ` [PATCH 6/7] Btrfs: __tree_mod_log_insert decrease max compare count Timofey Titovets
2017-06-07  9:45   ` Filipe Manana
2017-06-07 11:01     ` Timofey Titovets
2017-06-13 14:24       ` David Sterba
2017-06-07  0:58 ` [PATCH 7/7] Btrfs: end_workqueue_bio use switch case instead of else if Timofey Titovets
2017-06-07 22:48   ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).