public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* High priority threads causing severe CPU load imbalances
@ 2010-04-06 13:12 Suresh Jayaraman
  2010-04-06 14:08 ` Peter Zijlstra
  0 siblings, 1 reply; 8+ messages in thread
From: Suresh Jayaraman @ 2010-04-06 13:12 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra

I have a simple test program that accepts number of threads(pthreads) to
be created as a input. Each of these threads that gets created invokes a
function which is just a infinite while loop. The main function after
creating those threads goes in a infinite loop itself

My test machine is a Dual Core AMD Opteron(tm) 860 with 8
sockets(non-HT), I run this test program with number of threads ==
number of CPUs:

   ./loadcpu -t 16

I see 100% CPU utilization on almost all CPUs (via mpstat/htop/vmstat).

When the above threads are running, if I introduce a few high priority
threads by doing:

   nice -n -13 ./loadcpu -t 3

After a short while, I see a few CPUs becoming idle at ~0% utilization
(the number of CPUs becoming idle equals roughly the number of high
priority threads i.e. 3). When I stop the high priority threads, the CPU
utilization comes back to normal i.e. ~100%.

This is reproducible on 2.6.32.10 stable kernel with all the recent all
SMT fixes (I hope) and I think it would be reproducible in current
upstream as well.

sched_mc_power_savings has been always set to 0.

I spent a while staring at the load balancing and the thread migration
code, but could not figure out why this is happening. Would appreciate
any pointers.


Thanks,

-- 
Suresh Jayaraman

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

end of thread, other threads:[~2010-04-09  2:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 13:12 High priority threads causing severe CPU load imbalances Suresh Jayaraman
2010-04-06 14:08 ` Peter Zijlstra
2010-04-06 16:35   ` Suresh Jayaraman
2010-04-08 16:15     ` Peter Zijlstra
2010-04-09  2:20       ` Masayuki Igawa
2010-04-07  4:42   ` Andy Lutomirski
2010-04-07  7:44     ` Peter Zijlstra
2010-04-07  5:46   ` Masayuki Igawa

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