linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* HT and idle = poll
@ 2003-03-06  5:18 Andrew Theurer
  2003-03-06 19:30 ` Linus Torvalds
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Theurer @ 2003-03-06  5:18 UTC (permalink / raw)
  To: linux-kernel

The test:  kernbench (average of  kernel compiles5) with -j2 on a 2 physical/4 
logical P4 system.  This is on 2.5.64-HTschedB3:

idle != poll: Elapsed: 136.692s User: 249.846s System: 30.596s CPU: 204.8%
idle  = poll: Elapsed: 161.868s User: 295.738s System: 32.966s CPU: 202.6%

A 15.5% increase in compile times.

So, don't use idle=poll with HT when you know your workload has idle time!  I 
have not tried oprofile, but it stands to reason that this would be a 
problem.  There's no point in using idle=poll with oprofile and HT anyway, as 
the cpu utilization is totally wrong with HT to begin with (more on that 
later).

Presumably a logical cpu polling while idle uses too many cpu resources 
unnecessarily and significantly affects the performance of its sibling. 

-Andrew Theurer


^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: HT and idle = poll
@ 2003-03-06 21:15 Nakajima, Jun
  2003-03-06 22:42 ` Alan Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Nakajima, Jun @ 2003-03-06 21:15 UTC (permalink / raw)
  To: Linus Torvalds, Alan Cox; +Cc: Linux Kernel Mailing List

Linus,

That's correct. Basically mwait is similar to hlt, but you can avoid IPI to wake up the processor waiting. A write to the address specified by monitor wakes up the processor, unlike hlt.

So our plan is to use monitor/mwait in the idle loop, for example, in the kernel to lower the latency.

Jun

> -----Original Message-----
> From: Linus Torvalds [mailto:torvalds@transmeta.com]
> Sent: Thursday, March 06, 2003 12:09 PM
> To: Alan Cox
> Cc: Linux Kernel Mailing List
> Subject: Re: HT and idle = poll
> 
> 
> On 6 Mar 2003, Alan Cox wrote:
> > On Thu, 2003-03-06 at 19:30, Linus Torvalds wrote:
> > > >So, don't use idle=poll with HT when you know your workload has idle
> time!  I
> > > >have not tried oprofile, but it stands to reason that this would be a
> >
> > idle=poll probably needs to be doing "rep nop" in a tight loop.
> 
> We already do that. It's not enough. The HT thing will still steal cycles
> continually, since the "rep nop" is really only equivalent to a
> "sched_yield()".
> 
> Think of "rep nop" as yielding, and "mwait" as a true wait.
> 
> (I don't actually have any real information on "mwait", so I may be wrong
> about the details on the new instructions. They looked obvious enough,
> though).
> 
> 		Linus
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

end of thread, other threads:[~2003-03-06 23:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-06  5:18 HT and idle = poll Andrew Theurer
2003-03-06 19:30 ` Linus Torvalds
2003-03-06 19:52   ` Davide Libenzi
2003-03-06 20:05     ` Linus Torvalds
2003-03-06 20:52       ` Davide Libenzi
2003-03-06 21:09   ` Alan Cox
2003-03-06 20:08     ` Linus Torvalds
2003-03-06 22:36       ` Eric Northup
2003-03-06 22:22   ` Martin J. Bligh
2003-03-06 23:59     ` John Levon
2003-03-06 21:15 Nakajima, Jun
2003-03-06 22:42 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).