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/