Skip to contentSkip to conversation

sched/doc: Update yield_task description in sched-design-CFS

PATCH Applied fqr 2 participants 2 messages Apr 3 – Apr 9

Subsystems (3)
lore
Share & tools
lore

fqr

author
#0 lore raw

PATCH 1/1 sched/doc: Update yield_task description in sched-design-CFS

From: fangqiurong <[email protected]>

The yield_task description referenced the long-removed compat_yield sysctl and described the function as a dequeue/enqueue cycle. Update it to reflect current behavior: yielding the CPU by moving the current task's position back in the runqueue.

Sync zh_CN and sp_SP translations.

---
 Documentation/scheduler/sched-design-CFS.rst                | 5 ++---
 .../translations/sp_SP/scheduler/sched-design-CFS.rst       | 6 +++---
 .../translations/zh_CN/scheduler/sched-design-CFS.rst       | 4 ++--
 3 files changed, 7 insertions(+), 8 deletions(-)
Documentation/scheduler/sched-design-CFS.rst +2 -3
index b574a2644c77..03998f6c8f9c 100644
@@ -183,9 +183,8 @@ This is the (partial) list of the hooks:
 
  - yield_task(...)
 
-   This function is basically just a dequeue followed by an enqueue, unless the
-   compat_yield sysctl is turned on; in that case, it places the scheduling
-   entity at the right-most end of the red-black tree.
+   This function yields the CPU by moving the currently running task's position back
+   in the runqueue, so that other runnable tasks get scheduled first.
 
  - wakeup_preempt(...)
 
Documentation/translations/sp_SP/scheduler/sched-design-CFS.rst +3 -3
index b35d24464be9..ff0ccbc59183 100644
@@ -198,9 +198,9 @@ Esta es la lista parcial de llamadas:
 
  - yield_task(...)
 
-   Esta función es básicamente desencolar, seguido por encolar, a menos que
-   sysctl compat_yield esté activado; en ese caso, sitúa la entidad a gestionar
-   en la parte más hacia la derecha del árbol rojo-negro.
+   Esta función cede la CPU desplazando la posición de la tarea actualmente
+   en ejecución hacia atrás en la cola de ejecución, para que otras tareas
+   ejecutables sean planificadas primero.
 
  - check_preempt_curr(...)
 
Documentation/translations/zh_CN/scheduler/sched-design-CFS.rst +2 -2
index abc6709ec3b2..03691e0309af 100644
@@ -144,8 +144,8 @@ array)。
 
  - yield_task(...)
 
-   这个函数的行为基本上是出队,紧接着入队,除非compat_yield sysctl被开启。在那种情况下,
-   它将调度实体放在红黑树的最右端。
+   此函数通过将当前任务在运行队列中的位置后移来让出 CPU,
+   使得其他可运行的任务优先被调度。
 
  - wakeup_preempt(...)
 
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 7 lines · fqr

From: fangqiurong <[email protected]>

The yield_task description referenced the long-removed compat_yield sysctl and described the function as a dequeue/enqueue cycle. Update it to reflect current behavior: yielding the CPU by moving the current task's position back in the runqueue.

Quoted 8 lines

Sync zh_CN and sp_SP translations.

---
 Documentation/scheduler/sched-design-CFS.rst                | 5 ++---
 .../translations/sp_SP/scheduler/sched-design-CFS.rst       | 6 +++---
 .../translations/zh_CN/scheduler/sched-design-CFS.rst       | 4 ++--
 3 files changed, 7 insertions(+), 8 deletions(-)

Applied, thanks.

Also dropped the strange user.email address in your email; you will want to fix that before sending anything else.

jon