mbox series

[0/5] cache request_queue pointer

Message ID cover.1634219547.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series cache request_queue pointer | expand

Message

Pavel Begunkov Oct. 14, 2021, 2:03 p.m. UTC
Cache request_queue in bdev and replace two derefs in
bdev->bd_disk->queue with bdev->bd_queue. Benchmarking
with nullblk gave me around +1% to peak perf.

All patches are self contained and don't rely on others from
the set including 1/5 and can be taken separately. And some
changes go in separate patches to minimise conflicts. When
we agree on the approach, I'll send the rest converting some
other spots out of block.

note: based on for-5.16/block-io_uring

Pavel Begunkov (5):
  block: cache request queue in bdev
  block: use bdev_get_queue() in bdev.c
  block: use bdev_get_queue() in bio.c
  block: use bdev_get_queue() in blk-core.c
  block: convert the rest of block to bdev_get_queue

 block/bdev.c              |  9 +++++----
 block/bio-integrity.c     |  2 +-
 block/bio.c               | 10 +++++-----
 block/blk-cgroup.c        | 16 ++++++++--------
 block/blk-core.c          | 10 +++++-----
 block/blk-crypto.c        |  2 +-
 block/blk-iocost.c        | 12 ++++++------
 block/blk-merge.c         |  2 +-
 block/blk-mq.c            |  2 +-
 block/blk-throttle.c      |  2 +-
 block/genhd.c             |  8 +++++---
 block/partitions/core.c   |  4 ++--
 include/linux/blk_types.h |  1 +
 include/linux/blkdev.h    |  2 +-
 14 files changed, 43 insertions(+), 39 deletions(-)

Comments

Jens Axboe Oct. 17, 2021, 12:59 p.m. UTC | #1
On 10/14/21 8:03 AM, Pavel Begunkov wrote:
> Cache request_queue in bdev and replace two derefs in
> bdev->bd_disk->queue with bdev->bd_queue. Benchmarking
> with nullblk gave me around +1% to peak perf.
> 
> All patches are self contained and don't rely on others from
> the set including 1/5 and can be taken separately. And some
> changes go in separate patches to minimise conflicts. When
> we agree on the approach, I'll send the rest converting some
> other spots out of block.

Looks fine to me. Christoph, any concerns?

One note, though - s/fater/faster in patches 2..5 in the commit
message.
Pavel Begunkov Oct. 17, 2021, 10:41 p.m. UTC | #2
On 10/17/21 12:59, Jens Axboe wrote:
> On 10/14/21 8:03 AM, Pavel Begunkov wrote:
>> Cache request_queue in bdev and replace two derefs in
>> bdev->bd_disk->queue with bdev->bd_queue. Benchmarking
>> with nullblk gave me around +1% to peak perf.
>>
>> All patches are self contained and don't rely on others from
>> the set including 1/5 and can be taken separately. And some
>> changes go in separate patches to minimise conflicts. When
>> we agree on the approach, I'll send the rest converting some
>> other spots out of block.
> 
> Looks fine to me. Christoph, any concerns?
> 
> One note, though - s/fater/faster in patches 2..5 in the commit
> message.

Noted. I expect there will be a bunch of conflicts, I'll resend
it, hopefully once you refined and posted some of your stuff.
Christoph Hellwig Oct. 18, 2021, 8:20 a.m. UTC | #3
On Sun, Oct 17, 2021 at 06:59:22AM -0600, Jens Axboe wrote:
> > All patches are self contained and don't rely on others from
> > the set including 1/5 and can be taken separately. And some
> > changes go in separate patches to minimise conflicts. When
> > we agree on the approach, I'll send the rest converting some
> > other spots out of block.
> 
> Looks fine to me. Christoph, any concerns?

No huge fan of the extra pointer, but if it helps..