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 473 } else if (sched_feat(APPROX_AVG) && cfs_rq->nr_running) 474 474 vruntime += sched_vslice(cfs_rq)/2; 475 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 + */ 476 482 if (initial && sched_feat(START_DEBIT)) 477 483 vruntime += sched_vslice_add(cfs_rq, se); 478 484 479 485 if (!initial) { 486 + /* sleeps upto a single latency don't count. */ 480 487 if (sched_feat(NEW_FAIR_SLEEPERS) && entity_is_task(se) && 481 488 task_of(se)->policy != SCHED_BATCH) 482 489 vruntime -= sysctl_sched_latency; 483 490 484 - vruntime = max_t(s64, vruntime, se->vruntime); 491 + /* ensure we never gain time by being placed backwards. */ 492 + vruntime = max_vruntime(se->vruntime, vruntime); 485 493 } 486 494 487 495 se->vruntime = vruntime; 488 - 489 496 } 490 497 491 498 static void