From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <32762b37691e254428ee1fd8ce6dac10@felloff.net> Date: Mon, 16 Dec 2013 11:17:00 +0100 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 9front pegs CPU on VMware Topicbox-Message-UUID: 9e315518-ead8-11e9-9d60-3106f5b1d025 the idlehands() on 9front is as follows: /* * put the processor in the halt state if we've no processes to run. * an interrupt will get us going again. */ void idlehands(void) { extern int nrdy; if(conf.nmach == 1) halt(); else if(m->cpuidcx & Monitor) mwait(&nrdy); } the reason for not just unconditionally calling halt() on a *multiprocessor* is that this would keep the processor sleeping even when processes become ready to be executed. there is currently no way for the first woken processor to wakup another one other than the monitor/mwait mechanism; which for some reason seems not to be emulated in that vmware fusion setup. one can run aux/cpuid to see what processor features are supported. yes, theres the HZ tick that should wake up the sleeping processor eventually, but then it might be too late. note, this only applies to *multiprocessor* systems. so when you setup your vm with just a single cpu, it will not waste cycles spinning. -- cinap