···9797 *9898 * Normal scheduling state is serialized by rq->lock. __schedule() takes the9999 * local CPU's rq->lock, it optionally removes the task from the runqueue and100100- * always looks at the local rq data structures to find the most elegible task100100+ * always looks at the local rq data structures to find the most eligible task101101 * to run next.102102 *103103 * Task enqueue is also under rq->lock, possibly taken from another CPU.···518518519519 /*520520 * Atomically grab the task, if ->wake_q is !nil already it means521521- * its already queued (either by us or someone else) and will get the521521+ * it's already queued (either by us or someone else) and will get the522522 * wakeup due to that.523523 *524524 * In order to ensure that a pending wakeup will observe our pending···769769 return false;770770771771 /*772772- * If there are more than one RR tasks, we need the tick to effect the772772+ * If there are more than one RR tasks, we need the tick to affect the773773 * actual RR behaviour.774774 */775775 if (rq->rt.rr_nr_running) {···11871187 * accounting was performed at enqueue time and we can just return11881188 * here.11891189 *11901190- * Need to be careful of the following enqeueue/dequeue ordering11901190+ * Need to be careful of the following enqueue/dequeue ordering11911191 * problem too11921192 *11931193 * enqueue(taskA)11941194 * // sched_uclamp_used gets enabled11951195 * enqueue(taskB)11961196 * dequeue(taskA)11971197- * // Must not decrement bukcet->tasks here11971197+ * // Must not decrement bucket->tasks here11981198 * dequeue(taskB)11991199 *12001200 * where we could end up with stale data in uc_se and···29242924#ifdef CONFIG_SMP29252925 if (p->sched_class->task_woken) {29262926 /*29272927- * Our task @p is fully woken up and running; so its safe to29272927+ * Our task @p is fully woken up and running; so it's safe to29282928 * drop the rq->lock, hereafter rq is only used for statistics.29292929 */29302930 rq_unpin_lock(rq, rf);···3411341134123412 /*34133413 * If the owning (remote) CPU is still in the middle of schedule() with34143414- * this task as prev, wait until its done referencing the task.34143414+ * this task as prev, wait until it's done referencing the task.34153415 *34163416 * Pairs with the smp_store_release() in finish_task().34173417 *···38163816#ifdef CONFIG_SMP38173817 if (p->sched_class->task_woken) {38183818 /*38193819- * Nothing relies on rq->lock after this, so its fine to38193819+ * Nothing relies on rq->lock after this, so it's fine to38203820 * drop it.38213821 */38223822 rq_unpin_lock(rq, &rf);···43434343}4344434443454345/*43464346- * IO-wait accounting, and how its mostly bollocks (on SMP).43464346+ * IO-wait accounting, and how it's mostly bollocks (on SMP).43474347 *43484348 * The idea behind IO-wait account is to account the idle time that we could43494349 * have spend running if it were not for IO. That is, if we were to improve the···48384838 /*48394839 * Optimization: we know that if all tasks are in the fair class we can48404840 * call that function directly, but only if the @prev task wasn't of a48414841- * higher scheduling class, because otherwise those loose the48414841+ * higher scheduling class, because otherwise those lose the48424842 * opportunity to pull in more work from other CPUs.48434843 */48444844 if (likely(prev->sched_class <= &fair_sched_class &&···53615361 * right. rt_mutex_slowunlock()+rt_mutex_postunlock() work together to53625362 * ensure a task is de-boosted (pi_task is set to NULL) before the53635363 * task is allowed to run again (and can exit). This ensures the pointer53645364- * points to a blocked task -- which guaratees the task is present.53645364+ * points to a blocked task -- which guarantees the task is present.53655365 */53665366 p->pi_top_task = pi_task;53675367···54795479 /*54805480 * The RT priorities are set via sched_setscheduler(), but we still54815481 * allow the 'normal' nice value to be set - but as expected54825482- * it wont have any effect on scheduling until the task is54825482+ * it won't have any effect on scheduling until the task is54835483 * SCHED_DEADLINE, SCHED_FIFO or SCHED_RR:54845484 */54855485 if (task_has_dl_policy(p) || task_has_rt_policy(p)) {···66686668 *66696669 * The scheduler is at all times free to pick the calling task as the most66706670 * eligible task to run, if removing the yield() call from your code breaks66716671- * it, its already broken.66716671+ * it, it's already broken.66726672 *66736673 * Typical broken usage is:66746674 *···7042704270437043#ifdef CONFIG_SMP70447044 /*70457045- * Its possible that init_idle() gets called multiple times on a task,70457045+ * It's possible that init_idle() gets called multiple times on a task,70467046 * in that case do_set_cpus_allowed() will not do the right thing.70477047 *70487048 * And since this is boot we can forgo the serialization.···82258225 return -EINVAL;82268226#endif82278227 /*82288228- * Serialize against wake_up_new_task() such that if its82288228+ * Serialize against wake_up_new_task() such that if it's82298229 * running, we're sure to observe its full state.82308230 */82318231 raw_spin_lock_irq(&task->pi_lock);