常见linux内核线程说明

时间:2021-06-11 16:09:51

参考:

1. Linux进程和内核级进程的一些知识

2. 内核文档kernel-per-CPU-kthreads.txt

ps进程名有方括号的是内核级的进程,执行辅助功能(比如将缓存写入到磁盘);所有其他进程都是使用者进程。您会注意到,就算是在您新安装的(最小化的)系统中,也会有很多进程在运行。

在文档kernel-per-CPU-kthreads.txt中列出了多核处理器的内核线程:

 

Name: ehca_comp/%u
Purpose: Periodically process Infiniband
-related work.

Name: irq
/%d-%s
Purpose: Handle threaded interrupts.

Name: kcmtpd_ctr_
%d
Purpose: Handle Bluetooth work.

Name: ksoftirqd
/%u
Purpose: Execute softirq handlers when threaded or when under heavy load.

Name: kworker
/%u:%d%s (cpu, id, priority)
Purpose: Execute workqueue requests

Name: rcuc
/%u
Purpose: Execute RCU callbacks
in CONFIG_RCU_BOOST=y kernels.

Name: rcuob
/%d, rcuop/%d, and rcuos/%d
Purpose: Offload RCU callbacks
from the corresponding CPU.

Name: watchdog
/%u
Purpose: Detect software lockups on each CPU.

 

一般情况下,多核处理器内核线程或多出上述相关内核线程。