Re: [PATCH] percpu_counter: Fix __percpu_counter_sum()

From: David Miller
Date: Thu Dec 04 2008 - 01:14:52 EST


From: Eric Dumazet <dada1@xxxxxxxxxxxxx>
Date: Wed, 03 Dec 2008 21:24:36 +0100

> [PATCH] percpu_counter: Fix __percpu_counter_sum()
>
> This function should not write into percpu local storage,
> without proper locking, or some changes done on other cpus
> might be lost.
>
> Adding proper locking would need to use atomic
> operations in fast path and would be expensive.
>
> Results of __percpu_counter_sum() can be wrong, this is a
> known fact.
>
> We also dont need to acquire the lock, this gives
> no better results.
>
> Signed-off-by: Eric Dumazet <dada1@xxxxxxxxxxxxx>

Acked-by: David S. Miller <davem@xxxxxxxxxxxxx>
--
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/