简体   繁体   English

linux kernel的调度代码中ttwu的完整形式

[英]Full form of ttwu in the scheduling code of the linux kernel

I know this is kind of silly, but I tried to find out online, but couldnt.我知道这有点傻,但我试图在网上找到,但找不到。

What is the full-form of ttwu in the scheduler code of the linux kernel. linux kernel的调度程序代码中ttwu的完整形式是什么。 It can be seen as a number of function prefixes, namely,可以看成是多个function前缀,即,

ttwu_do_wakeup
ttwu_do_activate
ttwu_queue_remote
ttwu_activate
.. and many more

I would assume it stands for try_to_wake_up .我认为它代表try_to_wake_up See for example the comment in kernel/sched/sched.h :例如,参见kernel/sched/sched.h中的注释:

 981     /* try_to_wake_up() stats */
 982     unsigned int        ttwu_count;
 983     unsigned int        ttwu_local;

yes in true *nix philosophy why waste time on extra characters (eg you want to know the current working directory? Use pwd for "print working directory") TTWU is indeed "Try To Wake Up" and implemented in the Linux scheduler code, eventually calling activate_task , which actually DOES NOT DO ANYTHING but put the task on the run queue of one of the CPUs.是的,在真正的 *nix 哲学中为什么要浪费时间在额外的字符上(例如,你想知道当前的工作目录?使用pwd表示“打印工作目录”) TTWU确实是“尝试唤醒”并最终在 Linux 调度程序代码中实现调用activate_task ,它实际上什么都不做,而是将任务放在其中一个 CPU 的运行队列中。 At some point in the future the _schedule function will make it activate (via switch_context .) Pretty cool stuff if you ask me.在未来的某个时候, _schedule function 将使其激活(通过switch_context 。)如果你问我,这很酷。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM