arch/x86/kernel/smpboot.c
worker_thread()-> process_one_work()-> do_fork_idle()-> fork_idle()-> copy_process()
firstly: there is one idle task for every CPU.
secondely: the idle process is forked by current process, here, it is kwoker0:1, and the name also is copyed, so idel processes and kworker0:1 have the same task name, it is also the reason that the kworker0:1 occupies the CPU so long time(more than 90%) showed by pytimechart tool.
thirdly: we can change the idle process name also in init_idle() by set_task_comm(), note that, we should set the name with CPU id, for example:
sprintf(str, "idle:%d", cpu);
set_task_comm(idle, str);
阅读(415) | 评论(0) | 转发(0) |