Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Friesen wrote:
Peter Williams wrote:
Chris Friesen wrote:

Suppose I have a really high priority task running. Another very high priority task wakes up and would normally preempt the first one. However, there happens to be another cpu available. It seems like it would be a win if we moved one of those tasks to the available cpu immediately so they can both run simultaneously. This would seem to require some communication between the scheduler and the load balancer.


Not really the load balancer can do this on its own AND the decision should be based on the STATIC priority of the task being woken.

I guess I don't follow. How would the load balancer know that it needs to run? Running on every task wake-up seems expensive. Also, static priority isn't everything. What about the gang-scheduler concept where certain tasks must be scheduled simultaneously on different cpus? What about a resource-group scenario where you have per-cpu resource limits, so that for good latency/fairness you need to force a high priority task to migrate to another cpu once it has consumed the cpu allocation of that group on the current cpu?

I can see having a generic load balancer core code, but it seems to me that the scheduler proper needs to have some way of triggering the load balancer to run,

It doesn't have to be closely coupled with the load balancer to does this. It just needs to know where the trigger is.

and some kind of goodness functions to indicate a) which tasks to move, and b) where to move them.

That's the load balancer's job and even if you use dynamic priority for load balancing it still wouldn't need to be closely coupled. The load balancer would just need to know how to find a process's dynamic priority.

In fact, in the current set up, the load balancer decides how much load needs to be moved based on the static load on the CPUs but uses dynamic priority (to a large degree) to decide which ones to move. This is due more to computational efficiency considerations than any deliberate design (I suspect) as the fact that tasks are stored on the runqueue in dynamic priority order makes looking at processes in dynamic priority order is the most efficient strategy.

Peter
--
Peter Williams                                   [email protected]

"Learning, n. The kind of ignorance distinguishing the studious."
 -- Ambrose Bierce
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux