Hi,
Hey Ming,
Use blk_mq_alloc_request() for allocating NVMe loop, fc, rdma and tcp's connect request, and selecting transport queue runtime for connect request. Then kill blk_mq_alloc_request_hctx().
Is it really so wrong to have an API to allocate a tag that belongs to a specific queue? Why must the tags allocation always correlate to the running cpu? Its true that NVMe is the only consumer of this at the moment, but does this mean that the interface should be removed because it has one (or rather four) consumer(s)? I would instead suggest to simply remove the constraint that blk_mq_alloc_request_hctx() will fail if the first cpu in the mask is not on the cpu_online_mask.. The caller of this would know and be able to handle it. To me it feels like this approach is fundamentally wrong. IMO, having the driver select a different queue than the tag naturally belongs to feels like a backwards design.