From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Martin Wilck <martin.wilck@suse.com>
Subject: Re: [PATCH] lib/sbitmap: kill 'depth' from sbitmap_word
Date: Mon, 10 Jan 2022 10:47:54 +0800 [thread overview]
Message-ID: <YdueWjYzHVP1bkU0@T590> (raw)
In-Reply-To: <8e24bd70-a817-ff8d-c59a-3e998e5cb869@kernel.dk>
On Sun, Jan 09, 2022 at 07:43:26PM -0700, Jens Axboe wrote:
> On 1/9/22 7:38 PM, Ming Lei wrote:
> > On Sun, Jan 09, 2022 at 06:54:21PM -0700, Jens Axboe wrote:
> >> On 1/9/22 6:50 PM, Ming Lei wrote:
> >>> Only the last sbitmap_word can have different depth, and all the others
> >>> must have same depth of 1U << sb->shift, so not necessary to store it in
> >>> sbitmap_word, and it can be retrieved easily and efficiently by adding
> >>> one internal helper of __map_depth(sb, index).
> >>>
> >>> Not see performance effect when running iops test on null_blk.
> >>>
> >>> This way saves us one cacheline(usually 64 words) per each sbitmap_word.
> >>
> >> We probably want to kill the ____cacheline_aligned_in_smp from 'word' as
> >> well.
> >
> > But sbitmap_deferred_clear_bit() is called in put fast path, then the
> > cacheline becomes shared with get path, and I guess this way isn't
> > expected.
>
> Just from 'word', not from 'cleared'. They will still be in separate
> cache lines, but usually doesn't make sense to have the leading member
> marked as cacheline aligned, that's a whole struct property at that
> point.
OK, got it, it is just sort of code style thing, and not any functional
change.
Will include it in V2.
Thanks,
Ming
next prev parent reply other threads:[~2022-01-10 2:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 1:50 [PATCH] lib/sbitmap: kill 'depth' from sbitmap_word Ming Lei
2022-01-10 1:54 ` Jens Axboe
2022-01-10 2:38 ` Ming Lei
2022-01-10 2:43 ` Jens Axboe
2022-01-10 2:47 ` Ming Lei [this message]
2022-01-10 2:49 ` Jens Axboe
2022-01-10 16:22 ` Martin Wilck
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=YdueWjYzHVP1bkU0@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=martin.wilck@suse.com \
/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.