Messages in this thread | | | From | "Luck, Tony" <> | Subject | RE: [PATCH] lockref: remove cpu_relax() again | Date | Thu, 5 Sep 2013 14:48:52 +0000 |
| |
> *If* however the cpu_relax() makes sense on other platforms maybe we could > add something like we have already with "arch_mutex_cpu_relax()":
I'll do some more measurements on ia64. During my first tests cpu_relax() seemed to be a big win - but I only ran "./t" a couple of times. Later (with the cpu_relax() in place) I ran a bunch more iterations, and found that the variation from run to run is much larger with lockref. The mean score is 60% higher, but the standard deviation is an order of magnitude bigger (enough that one run out of 20 with lockref scored lower than the pre-lockref kernel).
I think this is expected ... cmpxchg is a free-for-all - and sometimes poor placement across the four socket system might cause short term starvation to a thread while threads on another socket monopolize the cache line.
-Tony
| |