OK, done a bit of work on all other architectures, and diffed to the latest -mm. Any chance you can put it in -mm, Andrew? Also, while I was there, I thought I'd add the set_need_resched() thing to all the other architectures. I couldn't be bothered doing 2 patches, sorry. So, this has been tested on i386, ia64, ppc64, sparc64, x86-64, however some of those (esp. ppc64) use different idle routines for different architectures. Needs testing. David's ACK'ed the sparc64 changes, and Ingo's ACK'ed the rationale of the patch if not this exact one ;) No other architectures even compile tested, but they've at least got something there now. Quick audit of cpu_idle functions was interesting. I changed some, but they need review from maintainers, and some need more help. Is it worth sending this to linux-arch? alpha - set TIF_POLLING_NRFLAG. arm26 - how did it work before?! (fixed?) h8300 - Is sleeping racy vs interrupts? The H8/300 manual I found indicates yes, however disabling IRQs over the sleep mean only NMIs can wake it up, so can't fix easily without doing spin waiting. m68knommu - "stop" if need_resched() is *SET*?!? (changed, is this right?) - Is sleeping racy vs interrupts? parisc - set TIF_POLLING_NRFLAG. s390 - local irq disable before checking need_resched doesn't gain anything (removed, OK?) sh64 - Is sleeping racy vs interrupts? sparc - IRQs need to be on here => changed local_irq_save to _disable. - Changed idle loop so don't go to schedule() if pm_idle is NULL! - set TIF_POLLING_NRFLAG for SMP. - TODO: needs secondary CPUs to disable preempt um - I'm too lazy to really look. Might be OK :P xtensa - obviously not tested with preempt (hopefully fixed?) Thanks, Nick