看板 FB_smp 關於我們 聯絡資訊
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