9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] why not halt in x86 multicore
@ 2011-07-01 14:00 Henning Schild
  2011-07-01 17:23 ` erik quanstrom
  0 siblings, 1 reply; 13+ messages in thread
From: Henning Schild @ 2011-07-01 14:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi,

in pc/main.c idlehands() the kernel decides to release the CPU only
when you are not running a multicore kernel. As a result there is only
busy waiting. Unfortunately there is no hint telling why we do not let
the CPU rest a little.

> void
> idlehands(void)
> {
> 	if(conf.nmach == 1)
> 		halt();
> }

I am running a mostly idle plan9 VM on my laptop and it causes the
battery to discharge in no time. Right now my kernel has the condition
commented out and it seems to work fine. Still i would like
to understand why this condition was put there. It is probably causing a
lot of energy to be wasted which should better be for a good reason.

Henning



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

end of thread, other threads:[~2011-07-04 13:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01 14:00 [9fans] why not halt in x86 multicore Henning Schild
2011-07-01 17:23 ` erik quanstrom
2011-07-01 17:47   ` Ali Mashtizadeh
2011-07-01 17:51     ` Russ Cox
2011-07-01 18:01       ` erik quanstrom
2011-07-01 18:35         ` Bakul Shah
2011-07-02  5:06           ` Venkatesh Srinivas
2011-07-04  9:24   ` Henning Schild
2011-07-04  9:54     ` Sape Mullender
2011-07-04 13:02     ` erik quanstrom
2011-07-04 13:13       ` Steve Simon
2011-07-04 13:43         ` erik quanstrom
2011-07-04 13:47         ` Steve Simon

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).