* blk_mq_update_queue_map makes an (invalid?) assumption about cpu ordering
@ 2013-10-15 17:52 Jeff Moyer
2013-10-15 18:14 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Moyer @ 2013-10-15 17:52 UTC (permalink / raw)
To: jaxboe; +Cc: linux-kernel
Hi, Jens,
blk_mq_update_queue_map does this:
for_each_possible_cpu(i) {
if (!cpu_online(i)) {
map[i] = 0;
continue;
}
...
first_sibling = get_first_sibling(i);
if (first_sibling == i) {
map[i] = cpu_to_queue_index(nr_uniq_cpus, nr_queues,
queue);
queue++;
} else
map[i] = map[first_sibling];
This assumes that the first_sibling is listed before any other siblings,
which I don't believe is true. I don't think you get any guaranteed
ordering in that cpu_possible_mask.
... or did I miss something?
Cheers,
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: blk_mq_update_queue_map makes an (invalid?) assumption about cpu ordering
2013-10-15 17:52 blk_mq_update_queue_map makes an (invalid?) assumption about cpu ordering Jeff Moyer
@ 2013-10-15 18:14 ` Jens Axboe
2013-10-15 18:25 ` Jeff Moyer
0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2013-10-15 18:14 UTC (permalink / raw)
To: Jeff Moyer; +Cc: linux-kernel
On Tue, Oct 15 2013, Jeff Moyer wrote:
> Hi, Jens,
>
> blk_mq_update_queue_map does this:
>
> for_each_possible_cpu(i) {
> if (!cpu_online(i)) {
> map[i] = 0;
> continue;
> }
>
> ...
> first_sibling = get_first_sibling(i);
> if (first_sibling == i) {
> map[i] = cpu_to_queue_index(nr_uniq_cpus, nr_queues,
> queue);
> queue++;
> } else
> map[i] = map[first_sibling];
>
> This assumes that the first_sibling is listed before any other siblings,
> which I don't believe is true. I don't think you get any guaranteed
> ordering in that cpu_possible_mask.
>
> ... or did I miss something?
That's correct, it's assuming the first sibling is the lowest numbered
one. Are there cases where that would not be correct? I was sort of
assuming that was what "first" meant here.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: blk_mq_update_queue_map makes an (invalid?) assumption about cpu ordering
2013-10-15 18:14 ` Jens Axboe
@ 2013-10-15 18:25 ` Jeff Moyer
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Moyer @ 2013-10-15 18:25 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-kernel
Jens Axboe <axboe@kernel.dk> writes:
>> This assumes that the first_sibling is listed before any other siblings,
>> which I don't believe is true. I don't think you get any guaranteed
>> ordering in that cpu_possible_mask.
>>
>> ... or did I miss something?
>
> That's correct, it's assuming the first sibling is the lowest numbered
> one. Are there cases where that would not be correct? I was sort of
> assuming that was what "first" meant here.
Yeah, you're right. I hadn't read down the call chain:
static int get_first_sibling(unsigned int cpu)
ret = cpumask_first(topology_thread_cpumask(cpu));
Nothing to see here, move along...
-Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-15 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 17:52 blk_mq_update_queue_map makes an (invalid?) assumption about cpu ordering Jeff Moyer
2013-10-15 18:14 ` Jens Axboe
2013-10-15 18:25 ` Jeff Moyer
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.