[PATCH v7 for-4.13 6/7] block: Add rdma affinity based queue mapping helper

Sagi Grimberg sagi at grimberg.me
Wed Jul 12 03:36:19 PDT 2017


>> +int blk_mq_rdma_map_queues(struct blk_mq_tag_set *set,
>> +		struct ib_device *dev, int first_vec)
>> +{
>> +	const struct cpumask *mask;
>> +	unsigned int queue, cpu;
>> +
>> +	if (set->nr_hw_queues > dev->num_comp_vectors)
>> +		goto fallback;
> 
> Should this perhaps have been "if (first_vec + set->nr_hw_queues >
> dev->num_comp_vectors)"? Additionally, since the return value of
> ib_get_vector_affinity() is tested inside the loop, can this test be left out?

I guess it can...

>> +	return 0;
>> +fallback:
>> +	return blk_mq_map_queues(set);
> 
> If you have to repost this patch, please insert a blank line above the
> "fallback" label.

Will do, thanks!



More information about the Linux-nvme mailing list