public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* idle issues running sembench on 128 cpus
@ 2011-05-04 21:47 Dave Kleikamp
  2011-05-04 22:04 ` Thomas Gleixner
  2011-05-04 22:07 ` Andi Kleen
  0 siblings, 2 replies; 13+ messages in thread
From: Dave Kleikamp @ 2011-05-04 21:47 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Chris Mason, Peter Zijlstra, Tim Chen, linux-kernel

Thomas,
I've been looking at performance running sembench on a 128-cpu system 
and I'm running into some issues in the idle loop.

Initially, I was seeing a lot of contention on the clockevents_lock in 
clockevents_notify(). Assuming it is only protecting clockevents_chain, 
and not the handlers themselves, I changed this to an rwlock (with 
thoughts of using rcu if successful).

This didn't help, but exposed an underlying problem with high contention 
on tick_broadcast_lock in tick_broadcast_oneshot_control(). I think with 
this many cpus, tick_handle_oneshot_broadcast() is holding that lock a 
long time, causing the idle cpus to spin on the lock.

I am able to avoid this problem with either kernel parameter, 
"idle=mwait" or "processor.max_cstate=1". Similarly, defining 
CONFIG_INTEL_IDLE=y and using the kernel parameter 
intel_idle.max_cstate=1 exposes a different spinlock, pm_qos_lock, but I 
found this patch which fixes that contention:
https://lists.linux-foundation.org/pipermail/linux-pm/2011-February/030266.html
https://patchwork.kernel.org/patch/550721/

Of course, we'd like to find a way to reduce the spinlock contention and 
not resort to prohibiting the cpus from entering C3 state at all. I 
don't see a simple fix, and want to know if you've seen anything like 
this before and given it any thought.

I also don't know if it makes sense to be able to tune the cpuidle 
governors to add more resistance to enter the C3 state, or even being 
able to switch to a performance governor at runtime, similar to cpufreq.

I'd like to hear your thoughts before I dive any deeper into this.

Thanks,
Shaggy

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-05-05 15:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 21:47 idle issues running sembench on 128 cpus Dave Kleikamp
2011-05-04 22:04 ` Thomas Gleixner
2011-05-04 22:07 ` Andi Kleen
2011-05-04 22:34   ` Thomas Gleixner
2011-05-04 23:03     ` Andi Kleen
2011-05-04 23:29       ` Thomas Gleixner
2011-05-04 23:42         ` Andi Kleen
2011-05-04 23:47           ` Thomas Gleixner
2011-05-04 23:49             ` Andi Kleen
2011-05-04 23:51               ` Thomas Gleixner
2011-05-04 23:48           ` idle issues running sembench on 128 cpus II Andi Kleen
2011-05-05 15:24             ` Dave Kleikamp
2011-05-05 13:58         ` idle issues running sembench on 128 cpus Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox