Re: [PATCH 2/3] broadcast-tick: Move oneshot broadcast mask to percpu variables

From: Eric Dumazet
Date: Fri Aug 26 2011 - 18:48:52 EST


Le vendredi 26 aoÃt 2011 Ã 15:32 -0700, Andi Kleen a Ãcrit :
> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> Avoid a global cache line hotspot in the oneshot cpu mask. Maintain
> this information in per cpu variables instead.
>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> ---

>
> -/* FIXME: use cpumask_var_t. */
> -static DECLARE_BITMAP(tick_broadcast_oneshot_mask, NR_CPUS);
> +struct broadcast_cpu_state {
> + int need_oneshot;
> +} ____cacheline_aligned;
> +static DEFINE_PER_CPU(struct broadcast_cpu_state, state);

static DEFINE_PER_CPU_ALIGNED(...)

It avoids adding an alignment requirement on .data..percpu



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