why are scheduling domains used in multiprocessor systems

Peter Teoh htmldeveloper at gmail.com
Wed Jan 9 20:02:19 EST 2013


On Wed, Jan 9, 2013 at 4:03 PM, Bond <jamesbond.2k.g at gmail.com> wrote:

> Hi,
> please see this question
>
> http://stackoverflow.com/questions/14229793/what-does-struct-sched-domain-stands-for-in-include-linux-sched-h-scheduling-do
>
> I checked following
> http://lwn.net/Articles/169277/ and following
> http://www.kernel.org/doc/Documentation/scheduler/sched-domains.txt
> the first line of kernel.org doc says
> .............  Each CPU has a "base" scheduling domain (struct
> sched_domain)..............
> and second para says
> " each scheduling domain spans a number of CPUs (stored in the ->span
> field)."
> third para says
> "  Each scheduling domain must have one or more CPU
> groups..................
> The intersection of cpumasks from any two of these groups
> MUST be the empty set."
> then some where in doc it says
> "Balancing within a sched domain occurs between groups. That is, each group
> is treated as one entity." the doc in details talks about the
> implementation of
>
> scheduling domains and mentions that CPUs should belong to one of the
> scheduling domain in a way that
> cpumasks intersection should  be an  empty set
>
> The answer of the question that I want to know is
> why is a scheduling domain actually needed?
>
> _________________________________________
>
> CPU scheduling involving many configuration and factors.

https://www.cs.unm.edu/~eschulte/classes/cs587/data/10.1.1.59.6385.pdf

Goto page 18 for definition of scheduler domain, and it says:

"Each node in a system has a scheduler domain that points to its parent
scheduler domain. A node might be
a uniprocessor system, an SMP system, or a node within a NUMA system."

this complex hierarchies of CPU is normally associated with hardware
physical proximity CPU (just one factors) or the speed of bus that connect
between CPU.   Not all CPU are connected to all other CPU, but perhaps only
two or 4 other CPU, and therefore, when u transfer data between CPU, it is
necessary to build these proximities information into the kernel, to
minimize costs of data transfer between CPU.

90% (or more) of supercomputers (with thousands of CPU) are run by Linux
kernel, and clearly each CPU can only have a few neighboring CPU.   Other
factors involved power-management:   when your processing usage goes down,
u have to shut down the CPU - leaving only the bare minimum to be running.
  Organizing in some hierarchies facilitate this scheduling algorithm.

http://www.intel.com/technology/itj/2007/v11i4/9-process/6-linux-scheduler.htm
http://www.cs.stonybrook.edu/~porter/courses/cse506/f12/slides/scheduling.pdf
http://www.cs.stonybrook.edu/~porter/courses/cse506/f12/slides/scheduling2.pdf

-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130110/7d1577c8/attachment.html 


More information about the Kernelnewbies mailing list