All of lore.kernel.org
 help / color / mirror / Atom feed
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:38:41 +0800	[thread overview]
Message-ID: <YducMfW4vhk15CMq@T590> (raw)
In-Reply-To: <020ba538-bb41-c827-1290-c2939bf8940c@kernel.dk>

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.

Thanks,
Ming


  reply	other threads:[~2022-01-10  2:38 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 [this message]
2022-01-10  2:43     ` Jens Axboe
2022-01-10  2:47       ` Ming Lei
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=YducMfW4vhk15CMq@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.