sched: documentation: place_entity() comments

Add a few comments to place_entity(). No code changed.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Peter Zijlstra and committed by Ingo Molnar 2cb8600e 10b77724

+9 -2
+9 -2
kernel/sched_fair.c
··· 473 } else if (sched_feat(APPROX_AVG) && cfs_rq->nr_running) 474 vruntime += sched_vslice(cfs_rq)/2; 475 476 if (initial && sched_feat(START_DEBIT)) 477 vruntime += sched_vslice_add(cfs_rq, se); 478 479 if (!initial) { 480 if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se) && 481 task_of(se)->policy != SCHED_BATCH) 482 vruntime -= sysctl_sched_latency; 483 484 - vruntime = max_t(s64, vruntime, se->vruntime); 485 } 486 487 se->vruntime = vruntime; 488 - 489 } 490 491 static void
··· 473 } else if (sched_feat(APPROX_AVG) && cfs_rq->nr_running) 474 vruntime += sched_vslice(cfs_rq)/2; 475 476 + /* 477 + * The 'current' period is already promised to the current tasks, 478 + * however the extra weight of the new task will slow them down a 479 + * little, place the new task so that it fits in the slot that 480 + * stays open at the end. 481 + */ 482 if (initial && sched_feat(START_DEBIT)) 483 vruntime += sched_vslice_add(cfs_rq, se); 484 485 if (!initial) { 486 + /* sleeps upto a single latency don't count. */ 487 if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se) && 488 task_of(se)->policy != SCHED_BATCH) 489 vruntime -= sysctl_sched_latency; 490 491 + /* ensure we never gain time by being placed backwards. */ 492 + vruntime = max_vruntime(se->vruntime, vruntime); 493 } 494 495 se->vruntime = vruntime; 496 } 497 498 static void