From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, "Ewan D . Milne" <emilne@redhat.com>
Subject: Re: [PATCH] lib/sbitmap: allocate sb->map via kvzalloc_node
Date: Tue, 22 Mar 2022 08:25:30 +0800 [thread overview]
Message-ID: <YjkXenfaI7iSewSC@T590> (raw)
In-Reply-To: <20220316012708.354668-1-ming.lei@redhat.com>
Hello,
On Wed, Mar 16, 2022 at 09:27:08AM +0800, Ming Lei wrote:
> sbitmap has been used in scsi for replacing atomic operations on
> sdev->device_busy, so IOPS on some fast scsi storage can be improved.
>
> However, sdev->device_busy can be changed in fast path, so we have to
> allocate the sb->map statically. sdev->device_busy has been capped to 1024,
> but some drivers may configure the default depth as < 8, then
> cause each sbitmap word to hold only one bit. Finally 1024 * 128(
> sizeof(sbitmap_word)) bytes is needed for sb->map, given it is order 5
> allocation, sometimes it may fail.
>
> Avoid the issue by using kvzalloc_node() for allocating sb->map.
>
> Cc: Ewan D. Milne <emilne@redhat.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
Ping...
thanks,
Ming
next prev parent reply other threads:[~2022-03-22 0:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 1:27 [PATCH] lib/sbitmap: allocate sb->map via kvzalloc_node Ming Lei
2022-03-16 2:54 ` Chaitanya Kulkarni
2022-03-22 0:25 ` Ming Lei [this message]
2022-03-22 2:01 ` Jens Axboe
2022-03-22 2:52 ` Jens Axboe
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=YjkXenfaI7iSewSC@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=emilne@redhat.com \
--cc=linux-block@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.