9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jessica Yu <jyu@cowsay.org>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] rebalance() funny
Date: Sun, 30 Nov 2014 23:28:09 -0500	[thread overview]
Message-ID: <CACebkGPLGqK2LH1Vn2cK+F9K184Xx1nDsbbSgBXeL4x36ie5Eg@mail.gmail.com> (raw)

That definitely seems incorrect to me. Since rebalance is only called
on mach0, as it loops through the global run queue, it will skip
processes that are not on mach0, so I think you are correct. (This was
fixed on the mqs version of the nix scheduler; every mach calls
rebalance to take care of their respective run queues.)

On Sun, Nov 30, 2014 at 11:28 AM, erik quanstrom <quanstro@quanstro.net> wrote:
> rebalance(void)
> {
> ...
>                 if(p->mp != MACHP(m->machno))
>                         continue;
>
> since p->mp != nil for forked processes, and rebalance is only called
> on mach0, only processes on mach0 get rebalanced, for a 8 core system,
> that should be ~1/8 of them.
>
> this is so amazingly wrong, i can't help but wonder if i've missed
> something?
>
> (by the way, the old nix code didn't rebalance anything,
> unless it was on the first scheduler.)
>
> - erik
>



             reply	other threads:[~2014-12-01  4:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01  4:28 Jessica Yu [this message]
2014-12-01  5:54 ` erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2014-11-30 16:28 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=CACebkGPLGqK2LH1Vn2cK+F9K184Xx1nDsbbSgBXeL4x36ie5Eg@mail.gmail.com \
    --to=jyu@cowsay.org \
    --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).