lkml.org 
[lkml]   [2013]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] lockref: remove cpu_relax() again
Date
> *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


\
 
 \ /
  Last update: 2013-09-05 17:01    [W:0.059 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site