]> git.baikalelectronics.ru Git - kernel.git/commit
kyber: don't make domain token sbitmap larger than necessary
authorOmar Sandoval <osandov@fb.com>
Thu, 27 Sep 2018 22:55:53 +0000 (15:55 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Sep 2018 23:34:56 +0000 (17:34 -0600)
commit0a62d9358bcde189a7605b8edca0951cbac2938d
treea3bf07ac5b8ec7c46705c0efdfddfe3d8a8b70bc
parentd51da5719a935f12e8a56722c0a5b03b2091b804
kyber: don't make domain token sbitmap larger than necessary

The domain token sbitmaps are currently initialized to the device queue
depth or 256, whichever is larger, and immediately resized to the
maximum depth for that domain (256, 128, or 64 for read, write, and
other, respectively). The sbitmap is never resized larger than that, so
it's unnecessary to allocate a bitmap larger than the maximum depth.
Let's just allocate it to the maximum depth to begin with. This will use
marginally less memory, and more importantly, give us a more appropriate
number of bits per sbitmap word.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/kyber-iosched.c