Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3515017
  • 博文数量: 1805
  • 博客积分: 135
  • 博客等级: 入伍新兵
  • 技术积分: 3345
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-19 20:01
文章分类

全部博文(1805)

文章存档

2017年(19)

2016年(80)

2015年(341)

2014年(438)

2013年(349)

2012年(332)

2011年(248)

分类: LINUX

2013-12-18 20:34:17

原文地址:why kworker0:1 occupy CPU so high? 作者:tuyer

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) |
给主人留下些什么吧!~~