Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 May 2002 10:00:23 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        freebsd-smp@FreeBSD.org
Subject:   RE: hlt when idle?
Message-ID:  <XFMail.20020502100023.jhb@FreeBSD.org>
In-Reply-To: <15568.20086.979721.992191@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

On 01-May-2002 Andrew Gallatin wrote:
> 
> John Baldwin writes:
>  > 
>  > On 01-May-2002 Andrew Gallatin wrote:
>  > > 
>  > > 
>  > > Can somebody remind me why we do not hlt in the idle loop on MP x86s?
>  > > Is this because a HLTed CPU is not going to notice a new runnable job
>  > > (possibly migrating from another CPU) until it gets an interrupt to
>  > > wake it up?
>  > 
>  > Yes.
> 
> This seems to be an acceptable "loss" in performance in environments
> where cooling is a concern.  Is there a deadlock danger?  Or is it
> just a performance tweak to not HLT SMPs?  Would you object to making
> it a sysctl (machdep.smp_idle_hlt)?

Another thing that would be possible would be to try to narrow the race
further by keeping track of idle cpu's and sending out IPI's when threads
are made runnable.

>  > > Do both CPUs get clock interrupts on x86?
>  > 
>  > No, the interrupts seem to be round-robin, but each clock intr is only
>  > sent to one CPU unlike on alpha where they are broadcast.
> 
> So each CPU gets (1/num_cpu) * hz  clock interrupts/sec?

Well, I'm not sure how the interrupts are routed exactly, so I would
tentatively say "roughly" that many.  We ipi everyone else when we get
a clock interrupt on x86 to do effective broadcast interrupts.

> Drew

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020502100023.jhb>