remove a few uses of ->queuedata
Subsystems (14)
Hi all,
various bio based drivers use queue->queuedata despite already having set up disk->private_data, which can be used just as easily. This series cleans them up to only use a single private data pointer.
blk-mq based drivers that have code pathes that can't easily get at the gendisk are unaffected by this series.
PATCH 1/15 nfblock: use gendisk private_data
--- arch/m68k/emu/nfblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/m68k/emu/nfblock.c +2 -2
@@ -61,7 +61,7 @@ struct nfhd_device {static blk_qc_t nfhd_make_request (struct request_queue *queue,struct bio *bio) { -struct nfhd_device *dev = queue->queuedata; +struct nfhd_device *dev = bio->bi_disk->private_data;struct bio_vec bvec;struct bvec_iter iter;int dir, len, shift;
@@ -122,7 +122,6 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)if (dev->queue ==NULL ) goto free_dev; - dev->queue->queuedata = dev;blk_queue_logical_block_size (dev->queue, bsize); dev->disk =alloc_disk (16 );
@@ -136,6 +135,7 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)sprintf (dev->disk->disk_name,"nfhd%u" , dev_id);set_capacity (dev->disk, (sector_t )blocks * (bsize /512 )); dev->disk->queue = dev->queue; + dev->disk->private_data = dev;add_disk (dev->disk);
Signature · 1 line
2.26.2
Geert Uytterhoeven
maintainerRe: [PATCH 01/15] nfblock: use gendisk private_data
Hi Christoph,
Quoted 1 line · Christoph Hellwig
Signed-off-by Christoph Hellwig <[email protected]>
Thanks for your patch!
Quoted 20 lines
arch/m68k/emu/nfblock.c +1
-2@@ -61,7 +61,7 @@ struct nfhd_device {static blk_qc_t nfhd_make_request (struct request_queue *queue,struct bio *bio) { -struct nfhd_device *dev = queue->queuedata; +struct nfhd_device *dev = bio->bi_disk->private_data;struct bio_vec bvec;struct bvec_iter iter;int dir, len, shift;@@ -122,7 +122,6 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)if (dev->queue ==NULL ) goto free_dev; - dev->queue->queuedata = dev;blk_queue_logical_block_size (dev->queue, bsize); dev->disk =alloc_disk (16 );
arch/m68k/emu/nfblock.c static int __init nfhd_init_one(int id, u32 blocks, u32 bsize) · line 138
Quoted 4 lines
arch/m68k/emu/nfblock.c +1
-0@@ -136,6 +135,7 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)sprintf (dev->disk->disk_name,"nfhd%u" , dev_id);set_capacity (dev->disk, (sector_t )blocks * (bsize /512 )); dev->disk->queue = dev->queue; + dev->disk->private_data = dev;
This is already set above, just before the quoted sprintf() call.
arch/m68k/emu/nfblock.c static int __init nfhd_init_one(int id, u32 blocks, u32 bsize) · line 140
Quoted 2 lines
arch/m68k/emu/nfblock.c +0
-0add_disk (dev->disk);
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
PATCH 2/15 simdisk: stop using ->queuedata
In reply to Christoph Hellwig--- arch/xtensa/platforms/iss/simdisk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/xtensa/platforms/iss/simdisk.c +1 -3
@@ -103,7 +103,7 @@ static void simdisk_transfer(struct simdisk *dev, unsigned long sector,static blk_qc_t simdisk_make_request (struct request_queue *q,struct bio *bio) { -struct simdisk *dev = q->queuedata; +struct simdisk *dev = bio->bi_disk->private_data;struct bio_vec bvec;struct bvec_iter iter;sector_t sector = bio->bi_iter.bi_sector;
@@ -273,8 +273,6 @@ static int __init simdisk_setup(struct simdisk *dev, int which, goto out_alloc_queue; } - dev->queue->queuedata = dev; - dev->gd =alloc_disk (SIMDISK_MINORS );if (dev->gd ==NULL ) {pr_err ("alloc_disk failed\n" );
Signature · 1 line
2.26.2
PATCH 3/15 drbd: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/block/drbd/drbd_main.c | 1 - drivers/block/drbd/drbd_req.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/block/drbd/drbd_main.c +0 -1
@@ -2805,7 +2805,6 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsigif (!q) goto out_no_q; device->rq_queue = q; - q->queuedata = device; disk =alloc_disk (1 );if (!disk)
drivers/block/drbd/drbd_req.c +1 -1
@@ -1614,7 +1614,7 @@ void do_submit(struct work_struct *ws)blk_qc_t drbd_make_request (struct request_queue *q,struct bio *bio) { -struct drbd_device *device = (struct drbd_device *) q->queuedata; +struct drbd_device *device = bio->bi_disk->private_data;unsigned long start_jif;blk_queue_split (q, &bio);
Signature · 1 line
2.26.2
PATCH 4/15 null_blk: stop using ->queuedata for bio mode
In reply to Christoph Hellwig--- drivers/block/null_blk_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/null_blk_main.c +1 -1
@@ -1365,7 +1365,7 @@ static blk_qc_t null_queue_bio(struct request_queue *q, struct bio *bio) {sector_t sector = bio->bi_iter.bi_sector;sector_t nr_sectors =bio_sectors (bio); -struct nullb *nullb = q->queuedata; +struct nullb *nullb = bio->bi_disk->private_data;struct nullb_queue *nq =nullb_to_queue (nullb);struct nullb_cmd *cmd;
Signature · 1 line
2.26.2
PATCH 5/15 ps3vram: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/block/ps3vram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/block/ps3vram.c +1 -2
@@ -587,7 +587,7 @@ static struct bio *ps3vram_do_bio(struct ps3_system_bus_device *dev,static blk_qc_t ps3vram_make_request (struct request_queue *q,struct bio *bio) { -struct ps3_system_bus_device *dev = q->queuedata; +struct ps3_system_bus_device *dev = bio->bi_disk->private_data;struct ps3vram_priv *priv =ps3_system_bus_get_drvdata (dev);int busy;
@@ -745,7 +745,6 @@ static int ps3vram_probe(struct ps3_system_bus_device *dev) } priv->queue = queue; - queue->queuedata = dev;blk_queue_max_segments (queue,BLK_MAX_SEGMENTS );blk_queue_max_segment_size (queue,BLK_MAX_SEGMENT_SIZE );blk_queue_max_hw_sectors (queue,BLK_SAFE_MAX_SECTORS );
Signature · 1 line
2.26.2
PATCH 6/15 rsxx: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/block/rsxx/dev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/block/rsxx/dev.c +1 -4
@@ -133,7 +133,7 @@ static void bio_dma_done_cb(struct rsxx_cardinfo *card,static blk_qc_t rsxx_make_request (struct request_queue *q,struct bio *bio) { -struct rsxx_cardinfo *card = q->queuedata; +struct rsxx_cardinfo *card = bio->bi_disk->private_data;struct rsxx_bio_meta *bio_meta;blk_status_t st =BLK_STS_IOERR ;
@@ -282,8 +282,6 @@ int rsxx_setup_dev(struct rsxx_cardinfo *card) card->queue->limits.discard_alignment =RSXX_HW_BLK_SIZE ; } - card->queue->queuedata = card; -snprintf (card->gendisk->disk_name,sizeof (card->gendisk->disk_name),"rsxx%d" , card->disk_id); card->gendisk->major = card->major;
@@ -304,7 +302,6 @@ void rsxx_destroy_dev(struct rsxx_cardinfo *card) card->gendisk =NULL ;blk_cleanup_queue (card->queue); - card->queue->queuedata =NULL ;unregister_blkdev (card->major,DRIVER_NAME ); }
Signature · 1 line
2.26.2
PATCH 7/15 umem: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/block/umem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/umem.c +2 -2
@@ -521,7 +521,8 @@ static int mm_check_plugged(struct cardinfo *card)static blk_qc_t mm_make_request (struct request_queue *q,struct bio *bio) { -struct cardinfo *card = q->queuedata; +struct cardinfo *card = bio->bi_disk->private_data; +pr_debug ("mm_make_request %llu %u\n" , (unsigned long long )bio->bi_iter.bi_sector, bio->bi_iter.bi_size);
@@ -888,7 +889,6 @@ static int mm_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) card->queue =blk_alloc_queue (mm_make_request,NUMA_NO_NODE );if (!card->queue) goto failed_alloc; - card->queue->queuedata = card;tasklet_init (&card->tasklet, process_page, (unsigned long )card);
Signature · 1 line
2.26.2
PATCH 8/15 zram: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/block/zram/zram_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/block/zram/zram_drv.c +1 -2
@@ -1593,7 +1593,7 @@ static void __zram_make_request(struct zram *zram, struct bio *bio)*/ static blk_qc_t zram_make_request (struct request_queue *queue,struct bio *bio) { -struct zram *zram = queue->queuedata; +struct zram *zram = bio->bi_disk->private_data;if (!valid_io_request (zram, bio->bi_iter.bi_sector, bio->bi_iter.bi_size)) {
@@ -1916,7 +1916,6 @@ static int zram_add(void) zram->disk->first_minor = device_id; zram->disk->fops = &zram_devops; zram->disk->queue = queue; - zram->disk->queue->queuedata = zram; zram->disk->private_data = zram;snprintf (zram->disk->disk_name,16 ,"zram%d" , device_id);
Signature · 1 line
2.26.2
PATCH 9/15 lightnvm: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/lightnvm/core.c | 1 - drivers/lightnvm/pblk-init.c | 2 +- drivers/lightnvm/pblk.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-)
drivers/lightnvm/core.c +0 -1
@@ -400,7 +400,6 @@ static int nvm_create_tgt(struct nvm_dev *dev, struct nvm_ioctl_create *create) } tdisk->private_data = targetdata; - tqueue->queuedata = targetdata; mdts = (dev->geo.csecs >>9 ) *NVM_MAX_VLBA ;if (dev->geo.mdts) {
drivers/lightnvm/pblk-init.c +1 -1
@@ -49,7 +49,7 @@ struct bio_set pblk_bio_set;static blk_qc_t pblk_make_rq (struct request_queue *q,struct bio *bio) { -struct pblk *pblk = q->queuedata; +struct pblk *pblk = bio->bi_disk->private_data;if (bio_op (bio) ==REQ_OP_DISCARD ) {pblk_discard (pblk, bio);
drivers/lightnvm/pblk.h +1 -1
@@ -1255,7 +1255,7 @@ static inline int pblk_boundary_ppa_checks(struct nvm_tgt_dev *tgt_dev,continue ; } -print_ppa (tgt_dev->q->queuedata, ppa,"boundary" , i); +print_ppa (tgt_dev->disk->private_data, ppa,"boundary" , i);return 1 ; }
Signature · 1 line
2.26.2
PATCH 9/15 lightnvm: stop using ->queuedata
---
fixed the compilation in the print_ppa arguments
drivers/lightnvm/core.c | 1 - drivers/lightnvm/pblk-init.c | 2 +- drivers/lightnvm/pblk.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-)
drivers/lightnvm/core.c +0 -1
@@ -400,7 +400,6 @@ static int nvm_create_tgt(struct nvm_dev *dev, struct nvm_ioctl_create *create) } tdisk->private_data = targetdata; - tqueue->queuedata = targetdata; mdts = (dev->geo.csecs >>9 ) *NVM_MAX_VLBA ;if (dev->geo.mdts) {
drivers/lightnvm/pblk-init.c +1 -1
@@ -49,7 +49,7 @@ struct bio_set pblk_bio_set;static blk_qc_t pblk_make_rq (struct request_queue *q,struct bio *bio) { -struct pblk *pblk = q->queuedata; +struct pblk *pblk = bio->bi_disk->private_data;if (bio_op (bio) ==REQ_OP_DISCARD ) {pblk_discard (pblk, bio);
drivers/lightnvm/pblk.h +1 -1
@@ -1255,7 +1255,7 @@ static inline int pblk_boundary_ppa_checks(struct nvm_tgt_dev *tgt_dev,continue ; } -print_ppa (tgt_dev->q->queuedata, ppa,"boundary" , i); +print_ppa (tgt_dev->disk->q->private_data, ppa,"boundary" , i);return 1 ; }
Signature · 1 line
2.26.2
PATCH 10/15 bcache: stop setting ->queuedata
In reply to Christoph Hellwig--- drivers/md/bcache/super.c | 1 - 1 file changed, 1 deletion(-)
drivers/md/bcache/super.c +0 -1
@@ -871,7 +871,6 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,return -ENOMEM ; d->disk->queue = q; - q->queuedata = d; q->backing_dev_info->congested_data = d; q->limits.max_hw_sectors =UINT_MAX ; q->limits.max_sectors =UINT_MAX ;
Signature · 1 line
2.26.2
PATCH 11/15 dm: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/md/dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/dm.c +1 -2
@@ -1783,7 +1783,7 @@ static blk_qc_t dm_process_bio(struct mapped_device *md,static blk_qc_t dm_make_request (struct request_queue *q,struct bio *bio) { -struct mapped_device *md = q->queuedata; +struct mapped_device *md = bio->bi_disk->private_data;blk_qc_t ret =BLK_QC_T_NONE ;int srcu_idx;struct dm_table *map;
@@ -1980,7 +1980,6 @@ static struct mapped_device *alloc_dev(int minor) md->queue =blk_alloc_queue (dm_make_request, numa_node_id);if (!md->queue) goto bad; - md->queue->queuedata = md; md->disk =alloc_disk_node (1 , md->numa_node_id);if (!md->disk)
Signature · 1 line
2.26.2
PATCH 12/15 md: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/md/md.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/md.c +1 -2
@@ -466,7 +466,7 @@ static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio) {const int rw =bio_data_dir (bio);const int sgrp =op_stat_group (bio_op (bio)); -struct mddev *mddev = q->queuedata; +struct mddev *mddev = bio->bi_disk->private_data;unsigned int sectors;if (unlikely (test_bit (MD_BROKEN , &mddev->flags)) && (rw ==WRITE )) {
@@ -5626,7 +5626,6 @@ static int md_alloc(dev_t dev, char *name) mddev->queue =blk_alloc_queue (md_make_request,NUMA_NO_NODE );if (!mddev->queue) goto abort; - mddev->queue->queuedata = mddev;blk_set_stacking_limits (&mddev->queue->limits);
Signature · 1 line
2.26.2
Re: [PATCH 12/15] md: stop using ->queuedata
Quoted 2 lines · Christoph Hellwig
Signed-off-by Christoph Hellwig <[email protected]>
Thanks for the cleanup. IIUC, you want this go through md tree?
Otherwise,
Quoted 28 lines
--- drivers/md/md.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/md/md.c +1
-3@@ -466,7 +466,7 @@ static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio) {const int rw =bio_data_dir (bio);const int sgrp =op_stat_group (bio_op (bio)); -struct mddev *mddev = q->queuedata; +struct mddev *mddev = bio->bi_disk->private_data;unsigned int sectors;if (unlikely (test_bit (MD_BROKEN , &mddev->flags)) && (rw ==WRITE )) {@@ -5626,7 +5626,6 @@ static int md_alloc(dev_t dev, char *name) mddev->queue =blk_alloc_queue (md_make_request,NUMA_NO_NODE );if (!mddev->queue) goto abort; - mddev->queue->queuedata = mddev;blk_set_stacking_limits (&mddev->queue->limits); --2.26.2
Re: [PATCH 12/15] md: stop using ->queuedata
Quoted 5 lines · Song Liu
Quoted 2 lines · Christoph Hellwig
Signed-off-by Christoph Hellwig <[email protected]>Thanks for the cleanup. IIUC, you want this go through md tree?
Yes, please pick it up though the md tree.
Song Liu
maintainerRe: [PATCH 12/15] md: stop using ->queuedata
Quoted 9 lines · Christoph Hellwig
Quoted 5 lines · Song Liu
Quoted 2 lines · Christoph Hellwig
Signed-off-by Christoph Hellwig <[email protected]>Thanks for the cleanup. IIUC, you want this go through md tree?
Yes, please pick it up though the md tree.
Thanks for the clarification. Applied to md-next.
PATCH 13/15 nvdimm/blk: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/nvdimm/blk.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nvdimm/blk.c +2 -3
@@ -165,7 +165,7 @@ static int nsblk_do_bvec(struct nd_namespace_blk *nsblk,static blk_qc_t nd_blk_make_request (struct request_queue *q,struct bio *bio) {struct bio_integrity_payload *bip; -struct nd_namespace_blk *nsblk; +struct nd_namespace_blk *nsblk = bio->bi_disk->private_data;struct bvec_iter iter;unsigned long start;struct bio_vec bvec;
@@ -176,7 +176,6 @@ static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio)return BLK_QC_T_NONE ; bip =bio_integrity (bio); - nsblk = q->queuedata; rw =bio_data_dir (bio); do_acct =nd_iostat_start (bio, &start);bio_for_each_segment (bvec, bio, iter) {
@@ -258,7 +257,6 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk)blk_queue_max_hw_sectors (q,UINT_MAX );blk_queue_logical_block_size (q,nsblk_sector_size (nsblk));blk_queue_flag_set (QUEUE_FLAG_NONROT , q); - q->queuedata = nsblk; disk =alloc_disk (0 );if (!disk)
@@ -268,6 +266,7 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk) disk->fops = &nd_blk_fops; disk->queue = q; disk->flags =GENHD_FL_EXT_DEVT ; + disk->private_data = nsblk;nvdimm_namespace_disk_name (&nsblk->common, disk->disk_name);if (devm_add_action_or_reset (dev, nd_blk_release_disk, disk))
Signature · 1 line
2.26.2
PATCH 14/15 nvdimm/btt: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/nvdimm/btt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/nvdimm/btt.c +1 -2
@@ -1442,7 +1442,7 @@ static int btt_do_bvec(struct btt *btt, struct bio_integrity_payload *bip,static blk_qc_t btt_make_request (struct request_queue *q,struct bio *bio) {struct bio_integrity_payload *bip =bio_integrity (bio); -struct btt *btt = q->queuedata; +struct btt *btt = bio->bi_disk->private_data;struct bvec_iter iter;unsigned long start;struct bio_vec bvec;
@@ -1543,7 +1543,6 @@ static int btt_blk_init(struct btt *btt)blk_queue_logical_block_size (btt->btt_queue, btt->sector_size);blk_queue_max_hw_sectors (btt->btt_queue,UINT_MAX );blk_queue_flag_set (QUEUE_FLAG_NONROT , btt->btt_queue); - btt->btt_queue->queuedata = btt;if (btt_meta_size (btt)) {int rc =nd_integrity_init (btt->btt_disk,btt_meta_size (btt));
Signature · 1 line
2.26.2
PATCH 15/15 nvdimm/pmem: stop using ->queuedata
In reply to Christoph Hellwig--- drivers/nvdimm/pmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/nvdimm/pmem.c +3 -3
@@ -196,7 +196,7 @@ static blk_qc_t pmem_make_request(struct request_queue *q, struct bio *bio)unsigned long start;struct bio_vec bvec;struct bvec_iter iter; -struct pmem_device *pmem = q->queuedata; +struct pmem_device *pmem = bio->bi_disk->private_data;struct nd_region *nd_region =to_region (pmem);if (bio->bi_opf &REQ_PREFLUSH )
@@ -231,7 +231,7 @@ static blk_qc_t pmem_make_request(struct request_queue *q, struct bio *bio)static int pmem_rw_page (struct block_device *bdev,sector_t sector,struct page *page,unsigned int op) { -struct pmem_device *pmem = bdev->bd_queue->queuedata; +struct pmem_device *pmem = bdev->bd_disk->private_data;blk_status_t rc;if (op_is_write (op))
@@ -464,7 +464,6 @@ static int pmem_attach_disk(struct device *dev,blk_queue_flag_set (QUEUE_FLAG_NONROT , q);if (pmem->pfn_flags &PFN_MAP )blk_queue_flag_set (QUEUE_FLAG_DAX , q); - q->queuedata = pmem; disk =alloc_disk_node (0 , nid);if (!disk)
@@ -474,6 +473,7 @@ static int pmem_attach_disk(struct device *dev, disk->fops = &pmem_fops; disk->queue = q; disk->flags =GENHD_FL_EXT_DEVT ; + disk->private_data = pmem; disk->queue->backing_dev_info->capabilities |=BDI_CAP_SYNCHRONOUS_IO ;nvdimm_namespace_disk_name (ndns, disk->disk_name); set_capacity(disk, (pmem->size - pmem->pfn_pad - pmem->data_offset)
Signature · 1 line
2.26.2
Quoted 6 lines · Christoph Hellwig
Hi all,
various bio based drivers use
queue->queuedatadespite already having set updisk->private_data, which can be used just as easily. This series cleans them up to only use a single private data pointer.
...but isn't the queue pretty much guaranteed to be cache hot and the gendisk cache cold? I'm not immediately seeing what else needs the gendisk in the I/O path. Is there another motivation I'm missing?
Quoted 11 lines · Dan Williams
Quoted 6 lines · Christoph Hellwig
Hi all,
various bio based drivers use
queue->queuedatadespite already having set updisk->private_data, which can be used just as easily. This series cleans them up to only use a single private data pointer....but isn't the queue pretty much guaranteed to be cache hot and the gendisk cache cold? I'm not immediately seeing what else needs the gendisk in the I/O path. Is there another motivation I'm missing?
->private_data is right next to the ->queue pointer, pat0 and part_tbl which are all used in the I/O submission path (generic_make_request / generic_make_request_checks). This is mostly a prep cleanup patch to also remove the pointless queue argument from ->make_request - then ->queue is an extra dereference and extra churn.
Dan Williams
Reviewed-byQuoted 14 lines · Christoph Hellwig
Quoted 11 lines · Dan Williams
Quoted 6 lines · Christoph Hellwig
Hi all,
various bio based drivers use
queue->queuedatadespite already having set updisk->private_data, which can be used just as easily. This series cleans them up to only use a single private data pointer....but isn't the queue pretty much guaranteed to be cache hot and the gendisk cache cold? I'm not immediately seeing what else needs the gendisk in the I/O path. Is there another motivation I'm missing?
Quoted 5 lines
->private_data is right next to the ->queue pointer, pat0 and
part_tblwhich are all used in the I/O submission path (generic_make_request/generic_make_request_checks). This is mostly a prep cleanup patch to also remove the pointless queue argument from ->make_request - then ->queue is an extra dereference and extra churn.
Ah ok. If the changelogs had been filled in with something like "In preparation for removing @q from make_request_fn, stop using ->queuedata", I probably wouldn't have looked twice.
For the nvdimm/ driver updates you can add:
...or just let me know if you want me to pick those up through the nvdimm tree.
Quoted 9 lines · Dan Williams
Quoted 4 lines
which are all used in the I/O submission path (
generic_make_request/generic_make_request_checks). This is mostly a prep cleanup patch to also remove the pointless queue argument from ->make_request - then ->queue is an extra dereference and extra churn.Ah ok. If the changelogs had been filled in with something like "In preparation for removing @q from
make_request_fn, stop using ->queuedata", I probably wouldn't have looked twice.
Quoted 5 lines
For the nvdimm/ driver updates you can add:
Reviewed-by Dan Williams <[email protected]>...or just let me know if you want me to pick those up through the nvdimm tree.
I'd love you to pick them up through the nvdimm tree. Do you want to fix up the commit message yourself?
Quoted 11 lines · Christoph Hellwig
Quoted 9 lines · Dan Williams
Quoted 4 lines
which are all used in the I/O submission path (
generic_make_request/generic_make_request_checks). This is mostly a prep cleanup patch to also remove the pointless queue argument from ->make_request - then ->queue is an extra dereference and extra churn.Ah ok. If the changelogs had been filled in with something like "In preparation for removing @q from
make_request_fn, stop using ->queuedata", I probably wouldn't have looked twice.
Quoted 8 lines
Quoted 5 lines
For the nvdimm/ driver updates you can add:
Reviewed-by Dan Williams <[email protected]>...or just let me know if you want me to pick those up through the nvdimm tree.
I'd love you to pick them up through the nvdimm tree. Do you want to fix up the commit message yourself?
Will do, thanks.
Quoted 8 lines · Christoph Hellwig
Hi all,
various bio based drivers use
queue->queuedatadespite already having set updisk->private_data, which can be used just as easily. This series cleans them up to only use a single private data pointer.blk-mq based drivers that have code pathes that can't easily get at the gendisk are unaffected by this series.
Yeah, before adding disk, there still may be requests queued to LLD for blk-mq based drivers.
So are there this similar situation for these bio based drivers?
Thanks,
Ming
Quoted 7 lines · Ming Lei
Quoted 6 lines · Christoph Hellwig
Hi all,
various bio based drivers use
queue->queuedatadespite already having set updisk->private_data, which can be used just as easily. This series cleans them up to only use a single private data pointer.
Quoted 7 lines
Quoted 2 lines
blk-mq based drivers that have code pathes that can't easily get at the gendisk are unaffected by this series.
Yeah, before adding disk, there still may be requests queued to LLD for blk-mq based drivers.
So are there this similar situation for these bio based drivers?
bio submittsion is based on the gendisk, so we can't submit before it is added. The passthrough request based path obviously doesn't apply here.