Re: [RFC] Correct behaviour of irq affinity?

From: Rusty Russell
Date: Tue Mar 24 2009 - 20:53:09 EST


On Tuesday 24 March 2009 23:09:37 Eric W. Biederman wrote:
> desc->affinity should be what the user requested, if it is at all
> possible to honor the user space request. YH the fact that we do not
> currently exercise the full freedom that user space gives us is
> irrelevant.

Yep, OK.

> YH has a point that several of the implementations of
> cpu_mask_to_apic_id do not take cpu_online_map into account and should
> probably be fixed. flat_cpu_mask_to_apicid was the one I could find.

Also the numaq apic.h. I'll do an audit and send a patch.

> Also now that I look at it there is one other bug in this routine
> that you have missed. set_extra_move_desc should be called before
> we set desc->affinity, as it compares that with the new value to
> see if we are going to be running on a new cpu, and if so we may
> need to reallocate irq_desc onto a new numa node. set_extra_move_desc
> looks a little fishy but it doesn't stand a chance if it is called
> with the wrong data.

Yes, agree with Yinghai's fix. I'll re-spin my patch on top of his.

Thanks for looking at this!
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/