Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2257368
  • 博文数量: 318
  • 博客积分: 8752
  • 博客等级: 中将
  • 技术积分: 4944
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-23 07:56
文章分类

全部博文(318)

文章存档

2019年(1)

2017年(2)

2016年(12)

2015年(2)

2014年(1)

2013年(17)

2012年(22)

2011年(9)

2010年(37)

2009年(33)

2008年(44)

2007年(43)

2006年(95)

分类: LINUX

2012-07-17 15:59:03

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);

阅读(4410) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~