Messages in this thread | | | Date | Wed, 16 Oct 2013 10:46:59 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 5/6] net: __this_cpu_inc in route.c |
| |
On Tue, Oct 15, 2013 at 12:47:27PM -0500, Christoph Lameter wrote: > The RT_CACHE_STAT_INC macro triggers the new preemption checks > for __this_cpu ops > > I do not see any other synchronization that would allow the use > of a __this_cpu operation here however in commit > dbd2915ce87e811165da0717f8e159276ebb803e Andrew justifies > the use of raw_smp_processor_id() here because "we do not care" > about races. > > So lets use raw_cpu ops here and hope for the best. The use of > __this_cpu op improves the situation already from what commit > dbd2915ce87e811165da0717f8e159276ebb803e did since the single instruction > emitted on x86 does not allow the race to occur anymore. However, > non x86 platforms could still experience a race here. >
Are we sure all !x86 implementations will DTRT in that it will increment some CPU and not get horribly confused? I suppose it would; but is that a guarantee given someplace?
| |