Blame view
kernel/sched_fair.c
27 KB
bf0f6f24a
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
/* * Completely Fair Scheduling (CFS) Class (SCHED_NORMAL/SCHED_BATCH) * * Copyright (C) 2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> * * Interactivity improvements by Mike Galbraith * (C) 2007 Mike Galbraith <efault@gmx.de> * * Various enhancements by Dmitry Adamushko. * (C) 2007 Dmitry Adamushko <dmitry.adamushko@gmail.com> * * Group scheduling enhancements by Srivatsa Vaddagiri * Copyright IBM Corporation, 2007 * Author: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> * * Scaled math optimizations by Thomas Gleixner * Copyright (C) 2007, Thomas Gleixner <tglx@linutronix.de> |
218050855
|
18 19 20 |
* * Adaptive scheduling granularity, math enhancements by Peter Zijlstra * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com> |
bf0f6f24a
|
21 22 23 |
*/ /* |
218050855
|
24 |
* Targeted preemption latency for CPU-bound tasks: |
722aab0c3
|
25 |
* (default: 20ms * (1 + ilog(ncpus)), units: nanoseconds) |
bf0f6f24a
|
26 |
* |
218050855
|
27 |
* NOTE: this latency value is not the same as the concept of |
d274a4cee
|
28 29 30 |
* 'timeslice length' - timeslices in CFS are of variable length * and have no persistent notion like in traditional, time-slice * based scheduling concepts. |
bf0f6f24a
|
31 |
* |
d274a4cee
|
32 33 |
* (to see the precise effective timeslice length of your workload, * run vmstat and monitor the context-switches (cs) field) |
bf0f6f24a
|
34 |
*/ |
19978ca61
|
35 |
unsigned int sysctl_sched_latency = 20000000ULL; |
2bd8e6d42
|
36 37 |
/* |
b2be5e96d
|
38 |
* Minimal preemption granularity for CPU-bound tasks: |
722aab0c3
|
39 |
* (default: 4 msec * (1 + ilog(ncpus)), units: nanoseconds) |
2bd8e6d42
|
40 |
*/ |
722aab0c3
|
41 |
unsigned int sysctl_sched_min_granularity = 4000000ULL; |
218050855
|
42 43 |
/* |
b2be5e96d
|
44 45 |
* is kept at sysctl_sched_latency / sysctl_sched_min_granularity */ |
722aab0c3
|
46 |
static unsigned int sched_nr_latency = 5; |
b2be5e96d
|
47 48 49 50 |
/* * After fork, child runs first. (default) If set to 0 then * parent will (try to) run first. |
218050855
|
51 |
*/ |
b2be5e96d
|
52 |
const_debug unsigned int sysctl_sched_child_runs_first = 1; |
bf0f6f24a
|
53 54 |
/* |
1799e35d5
|
55 56 57 58 59 60 61 62 |
* sys_sched_yield() compat mode * * This option switches the agressive yield implementation of the * old scheduler back on. */ unsigned int __read_mostly sysctl_sched_compat_yield; /* |
bf0f6f24a
|
63 |
* SCHED_BATCH wake-up granularity. |
722aab0c3
|
64 |
* (default: 10 msec * (1 + ilog(ncpus)), units: nanoseconds) |
bf0f6f24a
|
65 66 67 68 69 |
* * This option delays the preemption effects of decoupled workloads * and reduces their over-scheduling. Synchronous workloads will still * have immediate wakeup/sleep latencies. */ |
19978ca61
|
70 |
unsigned int sysctl_sched_batch_wakeup_granularity = 10000000UL; |
bf0f6f24a
|
71 72 73 |
/* * SCHED_OTHER wake-up granularity. |
722aab0c3
|
74 |
* (default: 10 msec * (1 + ilog(ncpus)), units: nanoseconds) |
bf0f6f24a
|
75 76 77 78 79 |
* * This option delays the preemption effects of decoupled workloads * and reduces their over-scheduling. Synchronous workloads will still * have immediate wakeup/sleep latencies. */ |
19978ca61
|
80 |
unsigned int sysctl_sched_wakeup_granularity = 10000000UL; |
bf0f6f24a
|
81 |
|
da84d9617
|
82 |
const_debug unsigned int sysctl_sched_migration_cost = 500000UL; |
bf0f6f24a
|
83 84 85 |
/************************************************************** * CFS operations on generic schedulable entities: */ |
62160e3f4
|
86 |
#ifdef CONFIG_FAIR_GROUP_SCHED |
bf0f6f24a
|
87 |
|
62160e3f4
|
88 |
/* cpu runqueue to which this cfs_rq is attached */ |
bf0f6f24a
|
89 90 |
static inline struct rq *rq_of(struct cfs_rq *cfs_rq) { |
62160e3f4
|
91 |
return cfs_rq->rq; |
bf0f6f24a
|
92 |
} |
62160e3f4
|
93 94 |
/* An entity is a task if it doesn't "own" a runqueue */ #define entity_is_task(se) (!se->my_q) |
bf0f6f24a
|
95 |
|
62160e3f4
|
96 |
#else /* CONFIG_FAIR_GROUP_SCHED */ |
bf0f6f24a
|
97 |
|
62160e3f4
|
98 99 100 |
static inline struct rq *rq_of(struct cfs_rq *cfs_rq) { return container_of(cfs_rq, struct rq, cfs); |
bf0f6f24a
|
101 102 103 |
} #define entity_is_task(se) 1 |
bf0f6f24a
|
104 105 106 107 108 109 110 111 112 113 114 |
#endif /* CONFIG_FAIR_GROUP_SCHED */ static inline struct task_struct *task_of(struct sched_entity *se) { return container_of(se, struct task_struct, se); } /************************************************************** * Scheduling class tree data structure manipulation methods: */ |
0702e3ebc
|
115 |
static inline u64 max_vruntime(u64 min_vruntime, u64 vruntime) |
02e0431a3
|
116 |
{ |
368059a97
|
117 118 |
s64 delta = (s64)(vruntime - min_vruntime); if (delta > 0) |
02e0431a3
|
119 120 121 122 |
min_vruntime = vruntime; return min_vruntime; } |
0702e3ebc
|
123 |
static inline u64 min_vruntime(u64 min_vruntime, u64 vruntime) |
b0ffd246e
|
124 125 126 127 128 129 130 |
{ s64 delta = (s64)(vruntime - min_vruntime); if (delta < 0) min_vruntime = vruntime; return min_vruntime; } |
0702e3ebc
|
131 |
static inline s64 entity_key(struct cfs_rq *cfs_rq, struct sched_entity *se) |
9014623c0
|
132 |
{ |
30cfdcfc5
|
133 |
return se->vruntime - cfs_rq->min_vruntime; |
9014623c0
|
134 |
} |
bf0f6f24a
|
135 136 137 |
/* * Enqueue an entity into the rb-tree: */ |
0702e3ebc
|
138 |
static void __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
139 140 141 142 |
{ struct rb_node **link = &cfs_rq->tasks_timeline.rb_node; struct rb_node *parent = NULL; struct sched_entity *entry; |
9014623c0
|
143 |
s64 key = entity_key(cfs_rq, se); |
bf0f6f24a
|
144 145 146 147 148 149 150 151 152 153 154 155 |
int leftmost = 1; /* * Find the right place in the rbtree: */ while (*link) { parent = *link; entry = rb_entry(parent, struct sched_entity, run_node); /* * We dont care about collisions. Nodes with * the same key stay together. */ |
9014623c0
|
156 |
if (key < entity_key(cfs_rq, entry)) { |
bf0f6f24a
|
157 158 159 160 161 162 163 164 165 166 167 168 |
link = &parent->rb_left; } else { link = &parent->rb_right; leftmost = 0; } } /* * Maintain a cache of leftmost tree entries (it is frequently * used): */ if (leftmost) |
57cb499df
|
169 |
cfs_rq->rb_leftmost = &se->run_node; |
bf0f6f24a
|
170 171 172 |
rb_link_node(&se->run_node, parent, link); rb_insert_color(&se->run_node, &cfs_rq->tasks_timeline); |
bf0f6f24a
|
173 |
} |
0702e3ebc
|
174 |
static void __dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
175 176 |
{ if (cfs_rq->rb_leftmost == &se->run_node) |
57cb499df
|
177 |
cfs_rq->rb_leftmost = rb_next(&se->run_node); |
e9acbff64
|
178 |
|
bf0f6f24a
|
179 |
rb_erase(&se->run_node, &cfs_rq->tasks_timeline); |
bf0f6f24a
|
180 181 182 183 184 185 186 187 188 189 190 |
} static inline struct rb_node *first_fair(struct cfs_rq *cfs_rq) { return cfs_rq->rb_leftmost; } static struct sched_entity *__pick_next_entity(struct cfs_rq *cfs_rq) { return rb_entry(first_fair(cfs_rq), struct sched_entity, run_node); } |
aeb73b040
|
191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
static inline struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) { struct rb_node **link = &cfs_rq->tasks_timeline.rb_node; struct sched_entity *se = NULL; struct rb_node *parent; while (*link) { parent = *link; se = rb_entry(parent, struct sched_entity, run_node); link = &parent->rb_right; } return se; } |
bf0f6f24a
|
205 206 207 |
/************************************************************** * Scheduling class statistics methods: */ |
b2be5e96d
|
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
#ifdef CONFIG_SCHED_DEBUG int sched_nr_latency_handler(struct ctl_table *table, int write, struct file *filp, void __user *buffer, size_t *lenp, loff_t *ppos) { int ret = proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos); if (ret || !write) return ret; sched_nr_latency = DIV_ROUND_UP(sysctl_sched_latency, sysctl_sched_min_granularity); return 0; } #endif |
647e7cac2
|
224 225 226 227 228 229 230 231 232 |
/* * The idea is to set a period in which each task runs once. * * When there are too many tasks (sysctl_sched_nr_latency) we have to stretch * this period because otherwise the slices get too small. * * p = (nr <= nl) ? l : l*nr/nl */ |
4d78e7b65
|
233 234 235 |
static u64 __sched_period(unsigned long nr_running) { u64 period = sysctl_sched_latency; |
b2be5e96d
|
236 |
unsigned long nr_latency = sched_nr_latency; |
4d78e7b65
|
237 238 239 240 241 242 243 244 |
if (unlikely(nr_running > nr_latency)) { period *= nr_running; do_div(period, nr_latency); } return period; } |
647e7cac2
|
245 246 247 248 249 250 |
/* * We calculate the wall-time slice from the period by taking a part * proportional to the weight. * * s = p*w/rw */ |
6d0f0ebd0
|
251 |
static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) |
218050855
|
252 |
{ |
647e7cac2
|
253 |
u64 slice = __sched_period(cfs_rq->nr_running); |
218050855
|
254 |
|
647e7cac2
|
255 256 |
slice *= se->load.weight; do_div(slice, cfs_rq->load.weight); |
218050855
|
257 |
|
647e7cac2
|
258 |
return slice; |
bf0f6f24a
|
259 |
} |
647e7cac2
|
260 261 262 263 264 265 |
/* * We calculate the vruntime slice. * * vs = s/w = p/rw */ static u64 __sched_vslice(unsigned long rq_weight, unsigned long nr_running) |
67e9fb2a3
|
266 |
{ |
647e7cac2
|
267 |
u64 vslice = __sched_period(nr_running); |
67e9fb2a3
|
268 |
|
10b777246
|
269 |
vslice *= NICE_0_LOAD; |
647e7cac2
|
270 |
do_div(vslice, rq_weight); |
67e9fb2a3
|
271 |
|
647e7cac2
|
272 273 |
return vslice; } |
5f6d858ec
|
274 |
|
647e7cac2
|
275 276 277 278 279 280 281 282 283 |
static u64 sched_vslice(struct cfs_rq *cfs_rq) { return __sched_vslice(cfs_rq->load.weight, cfs_rq->nr_running); } static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se) { return __sched_vslice(cfs_rq->load.weight + se->load.weight, cfs_rq->nr_running + 1); |
67e9fb2a3
|
284 |
} |
bf0f6f24a
|
285 286 287 288 289 |
/* * Update the current task's runtime statistics. Skip current tasks that * are not in our scheduling class. */ static inline void |
8ebc91d93
|
290 291 |
__update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr, unsigned long delta_exec) |
bf0f6f24a
|
292 |
{ |
bbdba7c0e
|
293 |
unsigned long delta_exec_weighted; |
b0ffd246e
|
294 |
u64 vruntime; |
bf0f6f24a
|
295 |
|
8179ca23d
|
296 |
schedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max)); |
bf0f6f24a
|
297 298 |
curr->sum_exec_runtime += delta_exec; |
7a62eabc4
|
299 |
schedstat_add(cfs_rq, exec_clock, delta_exec); |
e9acbff64
|
300 301 302 303 304 305 |
delta_exec_weighted = delta_exec; if (unlikely(curr->load.weight != NICE_0_LOAD)) { delta_exec_weighted = calc_delta_fair(delta_exec_weighted, &curr->load); } curr->vruntime += delta_exec_weighted; |
02e0431a3
|
306 307 308 309 310 311 |
/* * maintain cfs_rq->min_vruntime to be a monotonic increasing * value tracking the leftmost vruntime in the tree. */ if (first_fair(cfs_rq)) { |
b0ffd246e
|
312 313 |
vruntime = min_vruntime(curr->vruntime, __pick_next_entity(cfs_rq)->vruntime); |
02e0431a3
|
314 |
} else |
b0ffd246e
|
315 |
vruntime = curr->vruntime; |
02e0431a3
|
316 317 |
cfs_rq->min_vruntime = |
b0ffd246e
|
318 |
max_vruntime(cfs_rq->min_vruntime, vruntime); |
bf0f6f24a
|
319 |
} |
b7cc08965
|
320 |
static void update_curr(struct cfs_rq *cfs_rq) |
bf0f6f24a
|
321 |
{ |
429d43bcc
|
322 |
struct sched_entity *curr = cfs_rq->curr; |
8ebc91d93
|
323 |
u64 now = rq_of(cfs_rq)->clock; |
bf0f6f24a
|
324 325 326 327 328 329 330 331 332 333 |
unsigned long delta_exec; if (unlikely(!curr)) return; /* * Get the amount of time the current task was running * since the last time we changed load (this cannot * overflow on 32 bits): */ |
8ebc91d93
|
334 |
delta_exec = (unsigned long)(now - curr->exec_start); |
bf0f6f24a
|
335 |
|
8ebc91d93
|
336 337 |
__update_curr(cfs_rq, curr, delta_exec); curr->exec_start = now; |
d842de871
|
338 339 340 341 342 343 |
if (entity_is_task(curr)) { struct task_struct *curtask = task_of(curr); cpuacct_charge(curtask, delta_exec); } |
bf0f6f24a
|
344 345 346 |
} static inline void |
5870db5b8
|
347 |
update_stats_wait_start(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
348 |
{ |
d281918d7
|
349 |
schedstat_set(se->wait_start, rq_of(cfs_rq)->clock); |
bf0f6f24a
|
350 |
} |
bf0f6f24a
|
351 352 353 |
/* * Task is being enqueued - update stats: */ |
d2417e5a3
|
354 |
static void update_stats_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
355 |
{ |
bf0f6f24a
|
356 357 358 359 |
/* * Are we enqueueing a waiting task? (for current tasks * a dequeue/enqueue event is a NOP) */ |
429d43bcc
|
360 |
if (se != cfs_rq->curr) |
5870db5b8
|
361 |
update_stats_wait_start(cfs_rq, se); |
bf0f6f24a
|
362 |
} |
bf0f6f24a
|
363 |
static void |
9ef0a9615
|
364 |
update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
365 |
{ |
bbdba7c0e
|
366 367 |
schedstat_set(se->wait_max, max(se->wait_max, rq_of(cfs_rq)->clock - se->wait_start)); |
6cfb0d5d0
|
368 |
schedstat_set(se->wait_start, 0); |
bf0f6f24a
|
369 370 371 |
} static inline void |
19b6a2e37
|
372 |
update_stats_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
373 |
{ |
bf0f6f24a
|
374 375 376 377 |
/* * Mark the end of the wait period if dequeueing a * waiting task: */ |
429d43bcc
|
378 |
if (se != cfs_rq->curr) |
9ef0a9615
|
379 |
update_stats_wait_end(cfs_rq, se); |
bf0f6f24a
|
380 381 382 383 384 385 |
} /* * We are picking a new current task - update its stats: */ static inline void |
79303e9e0
|
386 |
update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
387 388 389 390 |
{ /* * We are starting a new run period: */ |
d281918d7
|
391 |
se->exec_start = rq_of(cfs_rq)->clock; |
bf0f6f24a
|
392 |
} |
bf0f6f24a
|
393 394 395 |
/************************************************** * Scheduling class queueing methods: */ |
30cfdcfc5
|
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
static void account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) { update_load_add(&cfs_rq->load, se->load.weight); cfs_rq->nr_running++; se->on_rq = 1; } static void account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) { update_load_sub(&cfs_rq->load, se->load.weight); cfs_rq->nr_running--; se->on_rq = 0; } |
2396af69b
|
411 |
static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
412 |
{ |
bf0f6f24a
|
413 414 |
#ifdef CONFIG_SCHEDSTATS if (se->sleep_start) { |
d281918d7
|
415 |
u64 delta = rq_of(cfs_rq)->clock - se->sleep_start; |
bf0f6f24a
|
416 417 418 419 420 421 422 423 424 425 426 |
if ((s64)delta < 0) delta = 0; if (unlikely(delta > se->sleep_max)) se->sleep_max = delta; se->sleep_start = 0; se->sum_sleep_runtime += delta; } if (se->block_start) { |
d281918d7
|
427 |
u64 delta = rq_of(cfs_rq)->clock - se->block_start; |
bf0f6f24a
|
428 429 430 431 432 433 434 435 436 |
if ((s64)delta < 0) delta = 0; if (unlikely(delta > se->block_max)) se->block_max = delta; se->block_start = 0; se->sum_sleep_runtime += delta; |
30084fbd1
|
437 438 439 440 441 442 443 |
/* * Blocking time is in units of nanosecs, so shift by 20 to * get a milliseconds-range estimation of the amount of * time that the task spent sleeping: */ if (unlikely(prof_on == SLEEP_PROFILING)) { |
e22f5bbf8
|
444 |
struct task_struct *tsk = task_of(se); |
30084fbd1
|
445 446 447 |
profile_hits(SLEEP_PROFILING, (void *)get_wchan(tsk), delta >> 20); } |
bf0f6f24a
|
448 449 450 |
} #endif } |
ddc972975
|
451 452 453 454 455 456 457 458 459 460 461 462 |
static void check_spread(struct cfs_rq *cfs_rq, struct sched_entity *se) { #ifdef CONFIG_SCHED_DEBUG s64 d = se->vruntime - cfs_rq->min_vruntime; if (d < 0) d = -d; if (d > 3*sysctl_sched_latency) schedstat_inc(cfs_rq, nr_spread_over); #endif } |
bf0f6f24a
|
463 |
static void |
aeb73b040
|
464 465 |
place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) { |
67e9fb2a3
|
466 |
u64 vruntime; |
aeb73b040
|
467 |
|
67e9fb2a3
|
468 |
vruntime = cfs_rq->min_vruntime; |
94dfb5e75
|
469 |
|
06877c33f
|
470 |
if (sched_feat(TREE_AVG)) { |
94dfb5e75
|
471 472 |
struct sched_entity *last = __pick_last_entity(cfs_rq); if (last) { |
67e9fb2a3
|
473 474 |
vruntime += last->vruntime; vruntime >>= 1; |
94dfb5e75
|
475 |
} |
67e9fb2a3
|
476 |
} else if (sched_feat(APPROX_AVG) && cfs_rq->nr_running) |
647e7cac2
|
477 |
vruntime += sched_vslice(cfs_rq)/2; |
94dfb5e75
|
478 |
|
2cb8600e6
|
479 480 481 482 483 484 |
/* * The 'current' period is already promised to the current tasks, * however the extra weight of the new task will slow them down a * little, place the new task so that it fits in the slot that * stays open at the end. */ |
94dfb5e75
|
485 |
if (initial && sched_feat(START_DEBIT)) |
647e7cac2
|
486 |
vruntime += sched_vslice_add(cfs_rq, se); |
aeb73b040
|
487 |
|
8465e792e
|
488 |
if (!initial) { |
2cb8600e6
|
489 |
/* sleeps upto a single latency don't count. */ |
6cbf1c126
|
490 |
if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se)) |
94359f05c
|
491 |
vruntime -= sysctl_sched_latency; |
2cb8600e6
|
492 493 |
/* ensure we never gain time by being placed backwards. */ vruntime = max_vruntime(se->vruntime, vruntime); |
aeb73b040
|
494 |
} |
67e9fb2a3
|
495 |
se->vruntime = vruntime; |
aeb73b040
|
496 497 498 |
} static void |
83b699ed2
|
499 |
enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup) |
bf0f6f24a
|
500 501 |
{ /* |
a2a2d6807
|
502 |
* Update run-time statistics of the 'current'. |
bf0f6f24a
|
503 |
*/ |
b7cc08965
|
504 |
update_curr(cfs_rq); |
bf0f6f24a
|
505 |
|
e9acbff64
|
506 |
if (wakeup) { |
aeb73b040
|
507 |
place_entity(cfs_rq, se, 0); |
2396af69b
|
508 |
enqueue_sleeper(cfs_rq, se); |
e9acbff64
|
509 |
} |
bf0f6f24a
|
510 |
|
d2417e5a3
|
511 |
update_stats_enqueue(cfs_rq, se); |
ddc972975
|
512 |
check_spread(cfs_rq, se); |
83b699ed2
|
513 514 |
if (se != cfs_rq->curr) __enqueue_entity(cfs_rq, se); |
30cfdcfc5
|
515 |
account_entity_enqueue(cfs_rq, se); |
bf0f6f24a
|
516 517 518 |
} static void |
525c2716a
|
519 |
dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep) |
bf0f6f24a
|
520 |
{ |
a2a2d6807
|
521 522 523 524 |
/* * Update run-time statistics of the 'current'. */ update_curr(cfs_rq); |
19b6a2e37
|
525 |
update_stats_dequeue(cfs_rq, se); |
db36cc7d6
|
526 |
if (sleep) { |
67e9fb2a3
|
527 |
#ifdef CONFIG_SCHEDSTATS |
bf0f6f24a
|
528 529 530 531 |
if (entity_is_task(se)) { struct task_struct *tsk = task_of(se); if (tsk->state & TASK_INTERRUPTIBLE) |
d281918d7
|
532 |
se->sleep_start = rq_of(cfs_rq)->clock; |
bf0f6f24a
|
533 |
if (tsk->state & TASK_UNINTERRUPTIBLE) |
d281918d7
|
534 |
se->block_start = rq_of(cfs_rq)->clock; |
bf0f6f24a
|
535 |
} |
db36cc7d6
|
536 |
#endif |
67e9fb2a3
|
537 |
} |
83b699ed2
|
538 |
if (se != cfs_rq->curr) |
30cfdcfc5
|
539 540 |
__dequeue_entity(cfs_rq, se); account_entity_dequeue(cfs_rq, se); |
bf0f6f24a
|
541 542 543 544 545 |
} /* * Preempt the current task with a newly woken task if needed: */ |
7c92e54f6
|
546 |
static void |
2e09bf556
|
547 |
check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) |
bf0f6f24a
|
548 |
{ |
116978308
|
549 |
unsigned long ideal_runtime, delta_exec; |
6d0f0ebd0
|
550 |
ideal_runtime = sched_slice(cfs_rq, curr); |
116978308
|
551 |
delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; |
3e3e13f39
|
552 |
if (delta_exec > ideal_runtime) |
bf0f6f24a
|
553 554 |
resched_task(rq_of(cfs_rq)->curr); } |
83b699ed2
|
555 |
static void |
8494f412e
|
556 |
set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) |
bf0f6f24a
|
557 |
{ |
83b699ed2
|
558 559 560 561 562 563 564 565 566 567 |
/* 'current' is not kept within the tree. */ if (se->on_rq) { /* * Any task has to be enqueued before it get to execute on * a CPU. So account for the time it spent waiting on the * runqueue. */ update_stats_wait_end(cfs_rq, se); __dequeue_entity(cfs_rq, se); } |
79303e9e0
|
568 |
update_stats_curr_start(cfs_rq, se); |
429d43bcc
|
569 |
cfs_rq->curr = se; |
eba1ed4b7
|
570 571 572 573 574 575 |
#ifdef CONFIG_SCHEDSTATS /* * Track our maximum slice length, if the CPU's load is at * least twice that of our own weight (i.e. dont track it * when there are only lesser-weight tasks around): */ |
495eca494
|
576 |
if (rq_of(cfs_rq)->load.weight >= 2*se->load.weight) { |
eba1ed4b7
|
577 578 579 580 |
se->slice_max = max(se->slice_max, se->sum_exec_runtime - se->prev_sum_exec_runtime); } #endif |
4a55b4503
|
581 |
se->prev_sum_exec_runtime = se->sum_exec_runtime; |
bf0f6f24a
|
582 |
} |
9948f4b2a
|
583 |
static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq) |
bf0f6f24a
|
584 |
{ |
08ec3df51
|
585 |
struct sched_entity *se = NULL; |
bf0f6f24a
|
586 |
|
08ec3df51
|
587 588 589 590 |
if (first_fair(cfs_rq)) { se = __pick_next_entity(cfs_rq); set_next_entity(cfs_rq, se); } |
bf0f6f24a
|
591 592 593 |
return se; } |
ab6cde269
|
594 |
static void put_prev_entity(struct cfs_rq *cfs_rq, struct sched_entity *prev) |
bf0f6f24a
|
595 596 597 598 599 600 |
{ /* * If still on the runqueue then deactivate_task() * was not called and update_curr() has to be done: */ if (prev->on_rq) |
b7cc08965
|
601 |
update_curr(cfs_rq); |
bf0f6f24a
|
602 |
|
ddc972975
|
603 |
check_spread(cfs_rq, prev); |
30cfdcfc5
|
604 |
if (prev->on_rq) { |
5870db5b8
|
605 |
update_stats_wait_start(cfs_rq, prev); |
30cfdcfc5
|
606 607 608 |
/* Put 'current' back into the tree. */ __enqueue_entity(cfs_rq, prev); } |
429d43bcc
|
609 |
cfs_rq->curr = NULL; |
bf0f6f24a
|
610 611 612 613 |
} static void entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) { |
bf0f6f24a
|
614 |
/* |
30cfdcfc5
|
615 |
* Update run-time statistics of the 'current'. |
bf0f6f24a
|
616 |
*/ |
30cfdcfc5
|
617 |
update_curr(cfs_rq); |
bf0f6f24a
|
618 |
|
ce6c13113
|
619 |
if (cfs_rq->nr_running > 1 || !sched_feat(WAKEUP_PREEMPT)) |
2e09bf556
|
620 |
check_preempt_tick(cfs_rq, curr); |
bf0f6f24a
|
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 |
} /************************************************** * CFS operations on tasks: */ #ifdef CONFIG_FAIR_GROUP_SCHED /* Walk up scheduling entities hierarchy */ #define for_each_sched_entity(se) \ for (; se; se = se->parent) static inline struct cfs_rq *task_cfs_rq(struct task_struct *p) { return p->se.cfs_rq; } /* runqueue on which this entity is (to be) queued */ static inline struct cfs_rq *cfs_rq_of(struct sched_entity *se) { return se->cfs_rq; } /* runqueue "owned" by this group */ static inline struct cfs_rq *group_cfs_rq(struct sched_entity *grp) { return grp->my_q; } /* Given a group's cfs_rq on one cpu, return its corresponding cfs_rq on * another cpu ('this_cpu') */ static inline struct cfs_rq *cpu_cfs_rq(struct cfs_rq *cfs_rq, int this_cpu) { |
29f59db3a
|
655 |
return cfs_rq->tg->cfs_rq[this_cpu]; |
bf0f6f24a
|
656 657 658 659 660 |
} /* Iterate thr' all leaf cfs_rq's on a runqueue */ #define for_each_leaf_cfs_rq(rq, cfs_rq) \ list_for_each_entry(cfs_rq, &rq->leaf_cfs_rq_list, leaf_cfs_rq_list) |
fad095a7b
|
661 662 663 |
/* Do the two (enqueued) entities belong to the same group ? */ static inline int is_same_group(struct sched_entity *se, struct sched_entity *pse) |
bf0f6f24a
|
664 |
{ |
fad095a7b
|
665 |
if (se->cfs_rq == pse->cfs_rq) |
bf0f6f24a
|
666 667 668 669 |
return 1; return 0; } |
fad095a7b
|
670 671 672 673 |
static inline struct sched_entity *parent_entity(struct sched_entity *se) { return se->parent; } |
bf0f6f24a
|
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 |
#else /* CONFIG_FAIR_GROUP_SCHED */ #define for_each_sched_entity(se) \ for (; se; se = NULL) static inline struct cfs_rq *task_cfs_rq(struct task_struct *p) { return &task_rq(p)->cfs; } static inline struct cfs_rq *cfs_rq_of(struct sched_entity *se) { struct task_struct *p = task_of(se); struct rq *rq = task_rq(p); return &rq->cfs; } /* runqueue "owned" by this group */ static inline struct cfs_rq *group_cfs_rq(struct sched_entity *grp) { return NULL; } static inline struct cfs_rq *cpu_cfs_rq(struct cfs_rq *cfs_rq, int this_cpu) { return &cpu_rq(this_cpu)->cfs; } #define for_each_leaf_cfs_rq(rq, cfs_rq) \ for (cfs_rq = &rq->cfs; cfs_rq; cfs_rq = NULL) |
fad095a7b
|
705 706 |
static inline int is_same_group(struct sched_entity *se, struct sched_entity *pse) |
bf0f6f24a
|
707 708 709 |
{ return 1; } |
fad095a7b
|
710 711 712 713 |
static inline struct sched_entity *parent_entity(struct sched_entity *se) { return NULL; } |
bf0f6f24a
|
714 715 716 717 718 719 720 |
#endif /* CONFIG_FAIR_GROUP_SCHED */ /* * The enqueue_task method is called before nr_running is * increased. Here we update the fair scheduling stats and * then put the task into the rbtree: */ |
fd390f6a0
|
721 |
static void enqueue_task_fair(struct rq *rq, struct task_struct *p, int wakeup) |
bf0f6f24a
|
722 723 724 725 726 727 728 729 |
{ struct cfs_rq *cfs_rq; struct sched_entity *se = &p->se; for_each_sched_entity(se) { if (se->on_rq) break; cfs_rq = cfs_rq_of(se); |
83b699ed2
|
730 |
enqueue_entity(cfs_rq, se, wakeup); |
b9fa3df33
|
731 |
wakeup = 1; |
bf0f6f24a
|
732 733 734 735 736 737 738 739 |
} } /* * The dequeue_task method is called before nr_running is * decreased. We remove the task from the rbtree and * update the fair scheduling stats: */ |
f02231e51
|
740 |
static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int sleep) |
bf0f6f24a
|
741 742 743 744 745 746 |
{ struct cfs_rq *cfs_rq; struct sched_entity *se = &p->se; for_each_sched_entity(se) { cfs_rq = cfs_rq_of(se); |
525c2716a
|
747 |
dequeue_entity(cfs_rq, se, sleep); |
bf0f6f24a
|
748 749 750 |
/* Don't dequeue parent if it has other entities besides us */ if (cfs_rq->load.weight) break; |
b9fa3df33
|
751 |
sleep = 1; |
bf0f6f24a
|
752 753 754 755 |
} } /* |
1799e35d5
|
756 757 758 |
* sched_yield() support is very simple - we dequeue and enqueue. * * If compat_yield is turned on then we requeue to the end of the tree. |
bf0f6f24a
|
759 |
*/ |
4530d7ab0
|
760 |
static void yield_task_fair(struct rq *rq) |
bf0f6f24a
|
761 |
{ |
db292ca30
|
762 763 764 |
struct task_struct *curr = rq->curr; struct cfs_rq *cfs_rq = task_cfs_rq(curr); struct sched_entity *rightmost, *se = &curr->se; |
bf0f6f24a
|
765 766 |
/* |
1799e35d5
|
767 768 769 770 |
* Are we the only task in the tree? */ if (unlikely(cfs_rq->nr_running == 1)) return; |
db292ca30
|
771 |
if (likely(!sysctl_sched_compat_yield) && curr->policy != SCHED_BATCH) { |
1799e35d5
|
772 773 |
__update_rq_clock(rq); /* |
a2a2d6807
|
774 |
* Update run-time statistics of the 'current'. |
1799e35d5
|
775 |
*/ |
2b1e315dd
|
776 |
update_curr(cfs_rq); |
1799e35d5
|
777 778 779 780 781 |
return; } /* * Find the rightmost entry in the rbtree: |
bf0f6f24a
|
782 |
*/ |
2b1e315dd
|
783 |
rightmost = __pick_last_entity(cfs_rq); |
1799e35d5
|
784 785 786 |
/* * Already in the rightmost position? */ |
2b1e315dd
|
787 |
if (unlikely(rightmost->vruntime < se->vruntime)) |
1799e35d5
|
788 789 790 791 |
return; /* * Minimally necessary key value to be last in the tree: |
2b1e315dd
|
792 793 |
* Upon rescheduling, sched_class::put_prev_task() will place * 'current' within the tree based on its new key value. |
1799e35d5
|
794 |
*/ |
30cfdcfc5
|
795 |
se->vruntime = rightmost->vruntime + 1; |
bf0f6f24a
|
796 797 798 799 800 |
} /* * Preempt the current task with a newly woken task if needed: */ |
2e09bf556
|
801 |
static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) |
bf0f6f24a
|
802 803 |
{ struct task_struct *curr = rq->curr; |
fad095a7b
|
804 |
struct cfs_rq *cfs_rq = task_cfs_rq(curr); |
8651a86c3
|
805 |
struct sched_entity *se = &curr->se, *pse = &p->se; |
502d26b52
|
806 |
unsigned long gran; |
bf0f6f24a
|
807 808 |
if (unlikely(rt_prio(p->prio))) { |
a8e504d2a
|
809 |
update_rq_clock(rq); |
b7cc08965
|
810 |
update_curr(cfs_rq); |
bf0f6f24a
|
811 812 813 |
resched_task(curr); return; } |
91c234b4e
|
814 815 816 817 818 819 |
/* * Batch tasks do not preempt (their preemption is driven by * the tick): */ if (unlikely(p->policy == SCHED_BATCH)) return; |
bf0f6f24a
|
820 |
|
77d9cc44b
|
821 822 |
if (!sched_feat(WAKEUP_PREEMPT)) return; |
8651a86c3
|
823 |
|
77d9cc44b
|
824 825 826 |
while (!is_same_group(se, pse)) { se = parent_entity(se); pse = parent_entity(pse); |
ce6c13113
|
827 |
} |
77d9cc44b
|
828 |
|
77d9cc44b
|
829 830 831 |
gran = sysctl_sched_wakeup_granularity; if (unlikely(se->load.weight != NICE_0_LOAD)) gran = calc_delta_fair(gran, &se->load); |
502d26b52
|
832 |
if (pse->vruntime + gran < se->vruntime) |
77d9cc44b
|
833 |
resched_task(curr); |
bf0f6f24a
|
834 |
} |
fb8d47240
|
835 |
static struct task_struct *pick_next_task_fair(struct rq *rq) |
bf0f6f24a
|
836 837 838 839 840 841 842 843 |
{ struct cfs_rq *cfs_rq = &rq->cfs; struct sched_entity *se; if (unlikely(!cfs_rq->nr_running)) return NULL; do { |
9948f4b2a
|
844 |
se = pick_next_entity(cfs_rq); |
bf0f6f24a
|
845 846 847 848 849 850 851 852 853 |
cfs_rq = group_cfs_rq(se); } while (cfs_rq); return task_of(se); } /* * Account for a descheduled task: */ |
31ee529cc
|
854 |
static void put_prev_task_fair(struct rq *rq, struct task_struct *prev) |
bf0f6f24a
|
855 856 857 858 859 860 |
{ struct sched_entity *se = &prev->se; struct cfs_rq *cfs_rq; for_each_sched_entity(se) { cfs_rq = cfs_rq_of(se); |
ab6cde269
|
861 |
put_prev_entity(cfs_rq, se); |
bf0f6f24a
|
862 863 |
} } |
681f3e685
|
864 |
#ifdef CONFIG_SMP |
bf0f6f24a
|
865 866 867 868 869 870 871 872 873 874 875 |
/************************************************** * Fair scheduling class load-balancing methods: */ /* * Load-balancing iterator. Note: while the runqueue stays locked * during the whole iteration, the current task might be * dequeued so the iterator has to be dequeue-safe. Here we * achieve that by always pre-iterating before returning * the current task: */ |
a9957449b
|
876 |
static struct task_struct * |
bf0f6f24a
|
877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 |
__load_balance_iterator(struct cfs_rq *cfs_rq, struct rb_node *curr) { struct task_struct *p; if (!curr) return NULL; p = rb_entry(curr, struct task_struct, se.run_node); cfs_rq->rb_load_balance_curr = rb_next(curr); return p; } static struct task_struct *load_balance_start_fair(void *arg) { struct cfs_rq *cfs_rq = arg; return __load_balance_iterator(cfs_rq, first_fair(cfs_rq)); } static struct task_struct *load_balance_next_fair(void *arg) { struct cfs_rq *cfs_rq = arg; return __load_balance_iterator(cfs_rq, cfs_rq->rb_load_balance_curr); } |
a4ac01c36
|
903 |
#ifdef CONFIG_FAIR_GROUP_SCHED |
bf0f6f24a
|
904 905 906 907 908 909 910 |
static int cfs_rq_best_prio(struct cfs_rq *cfs_rq) { struct sched_entity *curr; struct task_struct *p; if (!cfs_rq->nr_running) return MAX_PRIO; |
9b5b77512
|
911 912 913 |
curr = cfs_rq->curr; if (!curr) curr = __pick_next_entity(cfs_rq); |
bf0f6f24a
|
914 915 916 917 |
p = task_of(curr); return p->prio; } |
a4ac01c36
|
918 |
#endif |
bf0f6f24a
|
919 |
|
430106592
|
920 |
static unsigned long |
bf0f6f24a
|
921 |
load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, |
e1d1484f7
|
922 |
unsigned long max_load_move, |
a4ac01c36
|
923 924 |
struct sched_domain *sd, enum cpu_idle_type idle, int *all_pinned, int *this_best_prio) |
bf0f6f24a
|
925 926 |
{ struct cfs_rq *busy_cfs_rq; |
bf0f6f24a
|
927 928 929 930 931 932 933 |
long rem_load_move = max_load_move; struct rq_iterator cfs_rq_iterator; cfs_rq_iterator.start = load_balance_start_fair; cfs_rq_iterator.next = load_balance_next_fair; for_each_leaf_cfs_rq(busiest, busy_cfs_rq) { |
a4ac01c36
|
934 |
#ifdef CONFIG_FAIR_GROUP_SCHED |
bf0f6f24a
|
935 |
struct cfs_rq *this_cfs_rq; |
e56f31aad
|
936 |
long imbalance; |
bf0f6f24a
|
937 |
unsigned long maxload; |
bf0f6f24a
|
938 939 |
this_cfs_rq = cpu_cfs_rq(busy_cfs_rq, this_cpu); |
e56f31aad
|
940 |
imbalance = busy_cfs_rq->load.weight - this_cfs_rq->load.weight; |
bf0f6f24a
|
941 942 943 944 945 946 947 |
/* Don't pull if this_cfs_rq has more load than busy_cfs_rq */ if (imbalance <= 0) continue; /* Don't pull more than imbalance/2 */ imbalance /= 2; maxload = min(rem_load_move, imbalance); |
a4ac01c36
|
948 949 |
*this_best_prio = cfs_rq_best_prio(this_cfs_rq); #else |
e56f31aad
|
950 |
# define maxload rem_load_move |
a4ac01c36
|
951 |
#endif |
e1d1484f7
|
952 953 |
/* * pass busy_cfs_rq argument into |
bf0f6f24a
|
954 955 956 |
* load_balance_[start|next]_fair iterators */ cfs_rq_iterator.arg = busy_cfs_rq; |
e1d1484f7
|
957 958 959 960 |
rem_load_move -= balance_tasks(this_rq, this_cpu, busiest, maxload, sd, idle, all_pinned, this_best_prio, &cfs_rq_iterator); |
bf0f6f24a
|
961 |
|
e1d1484f7
|
962 |
if (rem_load_move <= 0) |
bf0f6f24a
|
963 964 |
break; } |
430106592
|
965 |
return max_load_move - rem_load_move; |
bf0f6f24a
|
966 |
} |
e1d1484f7
|
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 |
static int move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, struct sched_domain *sd, enum cpu_idle_type idle) { struct cfs_rq *busy_cfs_rq; struct rq_iterator cfs_rq_iterator; cfs_rq_iterator.start = load_balance_start_fair; cfs_rq_iterator.next = load_balance_next_fair; for_each_leaf_cfs_rq(busiest, busy_cfs_rq) { /* * pass busy_cfs_rq argument into * load_balance_[start|next]_fair iterators */ cfs_rq_iterator.arg = busy_cfs_rq; if (iter_move_one_task(this_rq, this_cpu, busiest, sd, idle, &cfs_rq_iterator)) return 1; } return 0; } |
681f3e685
|
990 |
#endif |
e1d1484f7
|
991 |
|
bf0f6f24a
|
992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 |
/* * scheduler tick hitting a task of our scheduling class: */ static void task_tick_fair(struct rq *rq, struct task_struct *curr) { struct cfs_rq *cfs_rq; struct sched_entity *se = &curr->se; for_each_sched_entity(se) { cfs_rq = cfs_rq_of(se); entity_tick(cfs_rq, se); } } |
8eb172d94
|
1005 |
#define swap(a, b) do { typeof(a) tmp = (a); (a) = (b); (b) = tmp; } while (0) |
4d78e7b65
|
1006 |
|
bf0f6f24a
|
1007 1008 1009 1010 1011 1012 1013 |
/* * Share the fairness runtime between parent and child, thus the * total amount of pressure for CPU stays equal - new tasks * get a chance to run but frequent forkers are not allowed to * monopolize the CPU. Note: the parent runqueue is locked, * the child is not running yet. */ |
ee0827d8b
|
1014 |
static void task_new_fair(struct rq *rq, struct task_struct *p) |
bf0f6f24a
|
1015 1016 |
{ struct cfs_rq *cfs_rq = task_cfs_rq(p); |
429d43bcc
|
1017 |
struct sched_entity *se = &p->se, *curr = cfs_rq->curr; |
00bf7bfc2
|
1018 |
int this_cpu = smp_processor_id(); |
bf0f6f24a
|
1019 1020 |
sched_info_queued(p); |
7109c4429
|
1021 |
update_curr(cfs_rq); |
aeb73b040
|
1022 |
place_entity(cfs_rq, se, 1); |
4d78e7b65
|
1023 |
|
3c90e6e99
|
1024 |
/* 'curr' will be NULL if the child belongs to a different group */ |
00bf7bfc2
|
1025 |
if (sysctl_sched_child_runs_first && this_cpu == task_cpu(p) && |
3c90e6e99
|
1026 |
curr && curr->vruntime < se->vruntime) { |
87fefa381
|
1027 |
/* |
edcb60a30
|
1028 1029 1030 |
* Upon rescheduling, sched_class::put_prev_task() will place * 'current' within the tree based on its new key value. */ |
4d78e7b65
|
1031 |
swap(curr->vruntime, se->vruntime); |
4d78e7b65
|
1032 |
} |
bf0f6f24a
|
1033 |
|
b9dca1e0f
|
1034 |
enqueue_task_fair(rq, p, 0); |
bb61c2108
|
1035 |
resched_task(rq->curr); |
bf0f6f24a
|
1036 |
} |
83b699ed2
|
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 |
/* Account for a task changing its policy or group. * * This routine is mostly called to set cfs_rq->curr field when a task * migrates between groups/classes. */ static void set_curr_task_fair(struct rq *rq) { struct sched_entity *se = &rq->curr->se; for_each_sched_entity(se) set_next_entity(cfs_rq_of(se), se); } |
bf0f6f24a
|
1049 1050 1051 |
/* * All the scheduling class methods: */ |
5522d5d5f
|
1052 1053 |
static const struct sched_class fair_sched_class = { .next = &idle_sched_class, |
bf0f6f24a
|
1054 1055 1056 |
.enqueue_task = enqueue_task_fair, .dequeue_task = dequeue_task_fair, .yield_task = yield_task_fair, |
2e09bf556
|
1057 |
.check_preempt_curr = check_preempt_wakeup, |
bf0f6f24a
|
1058 1059 1060 |
.pick_next_task = pick_next_task_fair, .put_prev_task = put_prev_task_fair, |
681f3e685
|
1061 |
#ifdef CONFIG_SMP |
bf0f6f24a
|
1062 |
.load_balance = load_balance_fair, |
e1d1484f7
|
1063 |
.move_one_task = move_one_task_fair, |
681f3e685
|
1064 |
#endif |
bf0f6f24a
|
1065 |
|
83b699ed2
|
1066 |
.set_curr_task = set_curr_task_fair, |
bf0f6f24a
|
1067 1068 1069 1070 1071 |
.task_tick = task_tick_fair, .task_new = task_new_fair, }; #ifdef CONFIG_SCHED_DEBUG |
5cef9eca3
|
1072 |
static void print_cfs_stats(struct seq_file *m, int cpu) |
bf0f6f24a
|
1073 |
{ |
bf0f6f24a
|
1074 |
struct cfs_rq *cfs_rq; |
75c28ace9
|
1075 1076 1077 |
#ifdef CONFIG_FAIR_GROUP_SCHED print_cfs_rq(m, cpu, &cpu_rq(cpu)->cfs); #endif |
c3b64f1e4
|
1078 |
for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq) |
5cef9eca3
|
1079 |
print_cfs_rq(m, cpu, cfs_rq); |
bf0f6f24a
|
1080 1081 |
} #endif |