[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4bd491e5-fab5-4e94-8719-560b5a4de01e@flourine.local>
Date: Thu, 14 Nov 2024 13:06:49 +0100
From: Daniel Wagner <dwagner@...e.de>
To: Ming Lei <ming.lei@...hat.com>
Cc: Daniel Wagner <wagi@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Bjorn Helgaas <bhelgaas@...gle.com>, "Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio PĂ©rez <eperezma@...hat.com>, "Martin K. Petersen" <martin.petersen@...cle.com>,
Keith Busch <kbusch@...nel.org>, Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
John Garry <john.g.garry@...cle.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hannes Reinecke <hare@...e.de>, linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, virtualization@...ts.linux.dev, linux-scsi@...r.kernel.org,
megaraidlinux.pdl@...adcom.com, mpi3mr-linuxdrv.pdl@...adcom.com,
MPT-FusionLinux.pdl@...adcom.com, storagedev@...rochip.com, linux-nvme@...ts.infradead.org
Subject: Re: [PATCH v4 05/10] blk-mq: introduce blk_mq_hctx_map_queues
On Thu, Nov 14, 2024 at 05:12:22PM +0800, Ming Lei wrote:
> I feel driver should get higher priority, but in the probe() example,
> call_driver_probe() actually tries bus->probe() first.
>
> But looks not an issue for this patchset since only hisi_sas_v2_driver(platform_driver)
> defines ->irq_get_affinity(), but the platform_bus_type doesn't have
> the callback.
Oh, I was not aware of this ordering. And after digging this up here:
https://lore.kernel.org/all/20060105142951.13.01@flint.arm.linux.org.uk/
I don't think we it's worthwhile to add the callback to device_driver
just for hisi_sas_v2. So I am going to drop this part again.
> > This brings up another topic I left out in this series.
> > blk_mq_map_queues does almost the same thing except it starts with the
> > mask returned by group_cpus_evenely. If we figure out how this could be
> > combined in a sane way it's possible to cleanup even a bit more. A bunch
> > of drivers do
> >
> > if (i != HCTX_TYPE_POLL && offset)
> > blk_mq_hctx_map_queues(map, dev->dev, offset);
> > else
> > blk_mq_map_queues(map);
> >
> > IMO it would be nice just to have one blk_mq_map_queues() which handles
> > this correctly for both cases.
>
> I guess it is doable, and the driver just setup the tag_set->map[], then call
> one generic map_queues API to do everything?
Yes, that is my idea. Just having one function which handles what
blk_mq_map_queues and blk_mq_hctx_map_queues/blk_mq_map_hw_queues
currently do.
Powered by blists - more mailing lists