Re: [PATCH 2/2][RFC] time : set broadcast irq affinity
From: Daniel Lezcano
Date: Mon Feb 25 2013 - 17:50:35 EST
On 02/22/2013 06:55 PM, Jacob Pan wrote:
> On Thu, 21 Feb 2013 23:01:23 +0100
> Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> wrote:
>
>> +/*
>> + * Set broadcast interrupt affinity
>> + */
>> +static void tick_broadcast_set_affinity(struct clock_event_device
>> *bc, int cpu) +{
>> + struct cpumask cpumask;
>> +
>> + if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
>> + return;
>> +
>> + cpumask_clear(&cpumask);
>> + cpumask_set_cpu(cpu, &cpumask);
>> + irq_set_affinity(bc->irq, &cpumask);
> would it be more efficient to keep track of the current bc->irq affinity
> via cpumask then set it only if it is different?
Do you mean a cpumask static variable ? and something like:
if (!cpumask_test_cpu(cpu, &affinitymask)) {
cpumask_set_cpu(cpu, &affinitymask);
irq_set_affinity(bc->irq, &affinitymask)
}
--
<http://www.linaro.org/> Linaro.org â Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
--
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/