All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] block: add and use tagset init helper
@ 2022-10-10 17:00 Chaitanya Kulkarni
  2022-10-10 17:00 ` [RFC PATCH 1/6] " Chaitanya Kulkarni
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Chaitanya Kulkarni @ 2022-10-10 17:00 UTC (permalink / raw)
  To: linux-block
  Cc: axboe, kch, hch, damien.lemoal, johannes.thumshirn, bvanassche,
	ming.lei, shinichiro.kawasaki, vincent.fu

Hi,

The newly added helper blk_mq_init_alloc_tag_set() replaces existing
call to blk_mq_alloc_tag_set() and takes following arguments to
initialize tag_set before calling blk_mq_alloc_tag_set() :-

* blk_mq_ops
* number of h/w queues
* queue depth
* driver data

This approach is taken similar to what we have in the code where helper
function is added to alloc and initialize the common code that was
repeted in the callers :-

* 8c16567d867ed 5 args-init and alloc helper bio_alloc_bioset()
* 0a3140ea0fae3 5 args-init and alloc helper blk_next_bio()
* cdb14e0f7775e 4 args-init and alloc helper blk_mq_alloc_sq_tag_set()

With 5 arguments it shuold be easy to review and we don't have to extend
the API even if tag_set gets a new member, I'll gradually change the
drivers slowly to avoid one big treewide change.

This avoids code repetation of inialization code of tag set in current
block drivers and any future ones.

-ck                    

Chaitanya Kulkarni (6):
  block: add and use tagset init helper
  nbd: use init alloc tagset helper
  virtio-blk: use init alloc tagset helper
  nvme-apple: use init alloc tagset helper
  nvme-core: use init alloc tagset helper
  nvme-pci: use init alloc tagset helper

 block/blk-mq.c                | 12 ++++++++++++
 drivers/block/nbd.c           |  7 ++-----
 drivers/block/null_blk/main.c |  7 ++-----
 drivers/block/virtio_blk.c    |  7 ++-----
 drivers/nvme/host/apple.c     | 14 ++++----------
 drivers/nvme/host/core.c      | 13 +++----------
 drivers/nvme/host/pci.c       |  5 ++++-
 include/linux/blk-mq.h        |  4 +++-
 8 files changed, 32 insertions(+), 37 deletions(-)

-- 
2.29.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-10-11 13:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-10 17:00 [RFC PATCH 0/6] block: add and use tagset init helper Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 1/6] " Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 2/6] nbd: use init alloc tagset helper Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 3/6] virtio-blk: " Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 4/6] nvme-apple: " Chaitanya Kulkarni
2022-10-11 11:53   ` kernel test robot
2022-10-11 13:07     ` Chaitanya Kulkarni
2022-10-11 13:07       ` Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 5/6] nvme-core: " Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 6/6] nvme-pci: " Chaitanya Kulkarni
2022-10-10 17:40 ` [RFC PATCH 0/6] block: add and use tagset init helper Chaitanya Kulkarni
2022-10-11  6:06 ` Christoph Hellwig

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.