From: Nikolay Borisov <nborisov@suse.com>
To: dsterba@suse.cz, David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/9] Extent buffer locking cleanups
Date: Mon, 18 Mar 2019 21:43:30 +0200 [thread overview]
Message-ID: <46ec6ad2-259b-9421-1041-b2e6d92200b9@suse.com> (raw)
In-Reply-To: <20190318192933.GH3516@twin.jikos.cz>
On 18.03.19 г. 21:29 ч., David Sterba wrote:
> On Thu, Mar 14, 2019 at 09:26:37AM +0200, Nikolay Borisov wrote:
>>
>>
>> On 13.03.19 г. 17:46 ч., David Sterba wrote:
>>> The series moves several atomic counters under CONFIG_BTRFS_DEBUG. The
>>> selected counters are not essential for the extent buffer locking to
>>> work. There's some space saving (4x 4B at least) and the cachelines are
>>> less stressed on non-debugging builds.
>>>
>>> The final size is 264 from 280, getting to 256 would be nice but hard or
>>> making the code unreadable. I have ideas to shave 7 more bytes but
>>> that's for another patchset.
>>>
>>> David Sterba (9):
>>> btrfs: add assertion helpers for spinning writers
>>> btrfs: use assertion helpers for spinning writers
>>> btrfs: add assertion helpers for spinning readers
>>> btrfs: use assertion helpers for spinning readers
>>> btrfs: add assertion helpers for extent buffer read lock counters
>>> btrfs: use assertion helpers for extent buffer read lock counters
>>> btrfs: add assertion helpers for extent buffer write lock counters
>>> btrfs: use assertion helpers for extent buffer write lock counters
>>> btrfs: switch extent_buffer::lock_nested to bool
>>>
>>> fs/btrfs/extent_io.c | 13 +++--
>>> fs/btrfs/extent_io.h | 11 ++--
>>> fs/btrfs/locking.c | 133 ++++++++++++++++++++++++++++++-------------
>>> 3 files changed, 107 insertions(+), 50 deletions(-)
>>
>> Overall the series looks good, one thing I wonder is wouldn't it be
>> better if you convert those WARN_ON to assert so that we fail fast in
>> case the locking invariant are broken?
>
> This probably makes sense, the patches copy the existing code without
> other updates. As it is entirely under debug ifdef, BUG_ON would work
> too so it's not dependent on asserts compiled in or not.
I'm fine with turning it into a BUG_ON as well.
>
next prev parent reply other threads:[~2019-03-18 19:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 15:46 [PATCH 0/9] Extent buffer locking cleanups David Sterba
2019-03-13 15:47 ` [PATCH 1/9] btrfs: add assertion helpers for spinning writers David Sterba
2019-03-13 15:47 ` [PATCH 2/9] btrfs: use " David Sterba
2019-03-13 15:47 ` [PATCH 3/9] btrfs: add assertion helpers for spinning readers David Sterba
2019-03-13 15:47 ` [PATCH 4/9] btrfs: use " David Sterba
2019-03-15 16:18 ` kbuild test robot
2019-03-15 21:43 ` David Sterba
2019-03-15 17:13 ` kbuild test robot
2019-03-13 15:47 ` [PATCH 5/9] btrfs: add assertion helpers for extent buffer read lock counters David Sterba
2019-03-13 15:47 ` [PATCH 6/9] btrfs: use " David Sterba
2019-03-13 15:47 ` [PATCH 7/9] btrfs: add assertion helpers for extent buffer write " David Sterba
2019-03-13 15:47 ` [PATCH 8/9] btrfs: use " David Sterba
2019-03-13 15:47 ` [PATCH 9/9] btrfs: switch extent_buffer::lock_nested to bool David Sterba
2019-03-14 7:26 ` [PATCH 0/9] Extent buffer locking cleanups Nikolay Borisov
2019-03-18 19:29 ` David Sterba
2019-03-18 19:43 ` Nikolay Borisov [this message]
2019-03-14 13:15 ` Johannes Thumshirn
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=46ec6ad2-259b-9421-1041-b2e6d92200b9@suse.com \
--to=nborisov@suse.com \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--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 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).