From: Matthew Veety <mveety@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 9front pegs CPU on VMware
Date: Mon, 16 Dec 2013 11:25:17 -0500 [thread overview]
Message-ID: <6B099879-E6A7-4362-AECC-AFDF1D29F276@gmail.com> (raw)
In-Reply-To: <822dae81e13ebb5ce6f0010188a7c7af@coraid.com>
On Dec 16, 2013, at 10:34, erik quanstrom <quanstro@labs.coraid.com> wrote:
>> /*
>> * 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.
>
> it won't be "too late"—as causing failures. i've tried testing this and
> generally found that reduced contention on the dog pile lock means
> unconditionally halting gives a performance boost.
>
> - erik
>
What are the changes you made to 9atom to facilitate this? Just replacing the if/else with a halt?
next prev parent reply other threads:[~2013-12-16 16:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 1:49 Blake McBride
2013-12-16 1:52 ` erik quanstrom
2013-12-16 2:35 ` Blake McBride
2013-12-16 2:58 ` andrey mirtchovski
2013-12-16 3:05 ` Blake McBride
2013-12-16 10:17 ` cinap_lenrek
2013-12-16 14:57 ` Blake McBride
2013-12-16 15:34 ` erik quanstrom
2013-12-16 16:25 ` Matthew Veety [this message]
2013-12-16 16:59 ` erik quanstrom
2013-12-17 11:00 ` cinap_lenrek
2013-12-17 13:38 ` erik quanstrom
2013-12-17 14:14 ` erik quanstrom
2013-12-19 9:01 ` Gorka Guardiola Muzquiz
2013-12-19 14:16 ` Gorka Guardiola
2013-12-19 15:19 ` erik quanstrom
2013-12-19 15:57 ` Gorka Guardiola
2013-12-19 16:15 ` erik quanstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6B099879-E6A7-4362-AECC-AFDF1D29F276@gmail.com \
--to=mveety@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).