~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/scheduler/sched-domains.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/scheduler/sched-domains.rst (Version linux-6.12-rc7) and /Documentation/scheduler/sched-domains.rst (Version linux-4.11.12)


  1 =================                                 
  2 Scheduler Domains                                 
  3 =================                                 
  4                                                   
  5 Each CPU has a "base" scheduling domain (struc    
  6 hierarchy is built from these base domains via    
  7 MUST be NULL terminated, and domain structures    
  8 locklessly updated.                               
  9                                                   
 10 Each scheduling domain spans a number of CPUs     
 11 A domain's span MUST be a superset of it child    
 12 be relaxed if the need arises), and a base dom    
 13 i. The top domain for each CPU will generally     
 14 although strictly it doesn't have to, but this    
 15 CPUs will never be given tasks to run unless t    
 16 explicitly set. A sched domain's span means "b    
 17 CPUs".                                            
 18                                                   
 19 Each scheduling domain must have one or more C    
 20 which are organised as a circular one way link    
 21 pointer. The union of cpumasks of these groups    
 22 domain's span. The group pointed to by the ->g    
 23 to which the domain belongs. Groups may be sha    
 24 read only data after they have been set up. Th    
 25 any two of these groups may be non empty. If t    
 26 flag is set on the corresponding scheduling do    
 27 shared between CPUs.                              
 28                                                   
 29 Balancing within a sched domain occurs between    
 30 is treated as one entity. The load of a group     
 31 load of each of its member CPUs, and only when    
 32 out of balance are tasks moved between groups.    
 33                                                   
 34 In kernel/sched/core.c, sched_balance_trigger(    
 35 through sched_tick(). It raises a softirq afte    
 36 rebalancing event for the current runqueue has    
 37 balancing workhorse, sched_balance_softirq()->    
 38 in softirq context (SCHED_SOFTIRQ).               
 39                                                   
 40 The latter function takes two arguments: the r    
 41 the CPU was idle at the time the sched_tick()     
 42 sched domains our CPU is on, starting from its    
 43 chain. While doing that, it checks to see if t    
 44 rebalance interval. If so, it runs sched_balan    
 45 the parent sched_domain (if it exists), and th    
 46 forth.                                            
 47                                                   
 48 Initially, sched_balance_rq() finds the busies    
 49 If it succeeds, it looks for the busiest runqu    
 50 that group. If it manages to find such a runqu    
 51 CPU's runqueue and the newly found busiest one    
 52 to our runqueue. The exact number of tasks amo    
 53 computed while iterating over this sched domai    
 54                                                   
 55 Implementing sched domains                        
 56 ==========================                        
 57                                                   
 58 The "base" domain will "span" the first level     
 59 of SMT, you'll span all siblings of the physic    
 60 a single virtual CPU.                             
 61                                                   
 62 In SMP, the parent of the base domain will spa    
 63 node. Each group being a single physical CPU.     
 64 of the SMP domain will span the entire machine    
 65 cpumask of a node. Or, you could do multi-leve    
 66 might have just one domain covering its one NU    
 67                                                   
 68 The implementor should read comments in includ    
 69 SD_* to get an idea of the specifics and what     
 70 of a sched_domain.                                
 71                                                   
 72 Architectures may override the generic domain     
 73 for a given topology level by creating a sched    
 74 calling set_sched_topology() with this array a    
 75                                                   
 76 The sched-domains debugging infrastructure can    
 77 CONFIG_SCHED_DEBUG and adding 'sched_verbose'     
 78 forgot to tweak your cmdline, you can also fli    
 79 /sys/kernel/debug/sched/verbose knob. This ena    
 80 the sched domains which should catch most poss    
 81 also prints out the domain structure in a visu    
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php