内核线程kthread分为绑定至指定CPU的线程,和不绑定至CPU的线程,
[kthread_tag]/[cpu_number]:XXXXX
是绑定至第cpu_number个cpu的内核线程[kthread_tag]/[cpu_number]:XXXXX,如何将这类线程从CPU中解绑定?
内核参数isolcpus 只对用户线程有效
基于cpuset 的cgroup 只能实现非绑定CPU内核线程的迁移
原来想着把cpu hotplug(#echo 0 > /sys/devices/system/cpu/cpuX/online),上面的任务总会被移除吧,但还是不行。
请问实现CPU-bound kthread 的CPU解绑,是否需要打内核补丁,
希望高手做过相关工作的指点下思路?
21 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/1
23 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/1:0H-events_highpri
24 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
25 root rt 0 0 0 0 S 0.0 0.0 0:00.16 migration/2
26 root rt 0 0 0 0 S 0.0 0.0 0:00.00 posixcputmr/2
27 root -2 0 0 0 0 S 0.0 0.0 0:00.04 rcuc/2
28 root 20 0 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/2
29 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/2:0-mm_percpu_wq
30 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/2:0H-events_highpri
31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/3
32 root rt 0 0 0 0 S 0.0 0.0 0:00.17 migration/3
33 root rt 0 0 0 0 S 0.0 0.0 0:00.00 posixcputmr/3
34 root -2 0 0 0 0 S 0.0 0.0 0:00.04 rcuc/3
35 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/3
36 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/3:0-mm_percpu_wq
37 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/3:0H-events_highpri
38 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/4
39 root rt 0 0 0 0 S 0.0 0.0 0:00.17 migration/4
40 root rt 0 0 0 0 S 0.0 0.0 0:00.00 posixcputmr/4
41 root -2 0 0 0 0 S 0.0 0.0 0:00.06 rcuc/4
42 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/4
43 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/4:0-mm_percpu_wq
44 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/4:0H-events_highpri
45 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/5
46 root rt 0 0 0 0 S 0.0 0.0 0:00.18 migration/5
--
修改:lambdago FROM 119.103.106.*
FROM 119.103.106.*