Re: [PATCH] irq: use per_cpu kstat_irqs

From: Tejun Heo
Date: Fri Nov 05 2010 - 04:29:16 EST


On 11/04/2010 06:48 PM, Eric Dumazet wrote:
> Use modern per_cpu API to increment {soft|hard}irq counters, and
> use per_cpu allocation for (struct irq_desc)->kstats_irq instead of an
> array.
>
> This gives better SMP/NUMA locality and saves few instructions per irq.
>
> With small nr_cpuids values (8 for example), kstats_irq was a small
> array (less than L1_CACHE_BYTES), potentially source of false sharing.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
> Cc: Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxx>
> Cc: Andi Kleen <andi@xxxxxxxxxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

Looks good to me although it would be nice to note the white space
fixes in the comment.

Reviewed-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun
--
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/