简体   繁体   中英

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. It can be seen as a number of function prefixes, namely,

ttwu_do_wakeup
ttwu_do_activate
ttwu_queue_remote
ttwu_activate
.. and many more

I would assume it stands for try_to_wake_up . See for example the comment in 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. At some point in the future the _schedule function will make it activate (via switch_context .) Pretty cool stuff if you ask me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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