Re: cross-cpu balancing with the new scheduler

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Sun Jan 13 2002 - 23:37:27 EST


In message <Pine.LNX.4.40.0201131842570.937-100000@blue1.dev.mcafeelabs.com> yo
u write:
> On Mon, 14 Jan 2002, Rusty Russell wrote:
>
> > This could be fixed by making "nr_running" closer to a "priority sum".
>
> I've a very simple phrase when QA is bugging me with these corner cases :
>
> "As Designed"

My point is: it's just a heuristic number. It currently reflects the
number on the runqueue, but there's no reason it *has to* (except the
name, of course).

1) The nr_running() function can use rq->active->nr_active +
   rq->expired->nr_active. And anyway it's only as "am I
   idle?".

2) The test inside schedule() can be replaced by checking the result
   of the sched_find_first_zero_bit() (I have a patch which does this
   to good effect, but for other reasons).

The other uses of nr_running are all "how long is this runqueue for
rebalancing", and Ingo *already* modifies his use of this number,
using the "prev_nr_running" hack.

Hope that clarifies,
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 21:00:43 EST