All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 0/4] Minor cleanups in locking helpers
Date: Tue, 24 Sep 2019 19:33:16 +0200	[thread overview]
Message-ID: <cover.1569345962.git.dsterba@suse.com> (raw)

Reorganizing code wrt locking helpers, minor text and stack savings.

Debugging build
~~~~~~~~~~~~~~~

   text    data     bss     dec     hex filename
1513898  146192   27496 1687586  19c022 pre/btrfs.ko
1514206  146768   27496 1688470  19c396 post/btrfs.ko
DELTA: +308
^^^^^^^^^^^ the increase is caused by inlining the
            btrfs_assert_tree_locked itself, IMO acceptable for debugging build

Stack report:

btrfs_clean_tree_block                                             -8 (24 -> 16)
btrfs_drop_subtree                                                 +8 (104 -> 112)
btrfs_mark_buffer_dirty                                            -8 (32 -> 24)
insert_ptr                                                         -8 (80 -> 72)

LOST (64):
        btrfs_assert_tree_read_locked                               8
        btrfs_assert_spinning_writers_get                          16
        btrfs_assert_spinning_readers_put                          16
        btrfs_assert_spinning_writers_put                          16
        btrfs_assert_tree_locked                                    8

NEW (0):
LOST/NEW DELTA:      -64
PRE/POST DELTA:      -80


Release build
~~~~~~~~~~~~~

   text    data     bss     dec     hex filename
1079643   17304   14912 1111859  10f733 pre/btrfs.ko
1079468   17316   14912 1111696  10f690 post/btrfs.ko
DELTA: -175
^^^^^^^^^^^ that's what counts

Stack report:

btrfs_drop_subtree                                                 -8 (80 -> 72)
btrfs_clean_tree_block                                             -8 (24 -> 16)
btrfs_mark_buffer_dirty                                            -8 (32 -> 24)
insert_ptr                                                         -8 (80 -> 72)

LOST (8):
        btrfs_assert_tree_locked                                    8

NEW (0):
LOST/NEW DELTA:       -8
PRE/POST DELTA:      -4

David Sterba (4):
  btrfs: make locking assertion helpers static inline
  btrfs: make btrfs_assert_tree_locked static inline
  btrfs: move btrfs_set_path_blocking to other locking functions
  btrfs: move btrfs_unlock_up_safe to other locking functions

 fs/btrfs/ctree.c         | 51 --------------------------
 fs/btrfs/ctree.h         |  1 -
 fs/btrfs/delayed-inode.c |  1 +
 fs/btrfs/locking.c       | 78 +++++++++++++++++++++++++++++++---------
 fs/btrfs/locking.h       | 13 ++++++-
 5 files changed, 75 insertions(+), 69 deletions(-)

-- 
2.23.0


             reply	other threads:[~2019-09-24 17:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 17:33 David Sterba [this message]
2019-09-24 17:33 ` [PATCH 1/4] btrfs: make locking assertion helpers static inline David Sterba
2019-09-24 17:33 ` [PATCH 2/4] btrfs: make btrfs_assert_tree_locked " David Sterba
2019-09-24 17:33 ` [PATCH 3/4] btrfs: move btrfs_set_path_blocking to other locking functions David Sterba
2019-09-24 17:33 ` [PATCH 4/4] btrfs: move btrfs_unlock_up_safe " David Sterba
2019-09-24 20:55 ` [PATCH 0/4] Minor cleanups in locking helpers Josef Bacik

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=cover.1569345962.git.dsterba@suse.com \
    --to=dsterba@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 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.