Messages in this thread | | | Subject | Re: [PATCH 1/2] x86, irq: update irq_cfg domain unless the new affinity is a subset of the current domain | From | Suresh Siddha <> | Date | Mon, 18 Jun 2012 17:51:37 -0700 |
| |
On Mon, 2012-06-18 at 11:17 +0200, Alexander Gordeev wrote: > I would suggest to go further and generalize your idea and introduce something > like compare_domains() instead sub_domain flag. This would help us to keep/let > __assign_irq_vector() be more generic and hide domains treating logic in > drivers.
That sounds good.
> @@ -1138,47 +1138,50 @@ __assign_irq_vector(int irq, struct irq_cfg *cfg, const struct cpumask *mask) > int new_cpu; > int vector, offset; > bool more_domains; > + int cmp_domains; > > - more_domains = apic->vector_allocation_domain(cpu, tmp_mask); > + more = apic->vector_allocation_domain(cpu, mask, tmp_mask); > + cmp = apic->compare_domains(tmp_mask, cfg->domain);
I think we should be able to consolidate both of them into one apic_driver specific routine. Also I think we should be able to use the tmp_mask in each round and minimize the number of unnecessary for_each_cpu iterations. And that should clean up the more_domains bool logic we did earlier.
Will post the complete patch in a day.
thanks, suresh
| |