static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper); struct smp_hotplug_thread { struct task_struct * __percpu *store; } /* 这样初始化,一个指向per-cpu的二级指针,却指向一个per-cpu变量的一级指针 */ static struct smp_hotplug_thread cpu_stop_threads = { //stop_machine.c .store = ...
对于运行在被拔核cpu上的stopper线程(migration)执行take_cpu_down,会先通过执行__cpu_disable将被拔核cpu设为offline,然后从CPUHP_TEARDOWN_CPU运行到CPUHP_AP_OFFLINE状态的teardown.single调用,然后调用stop_machine_park将stopper线程的flag置上KTHREAD_SHOULD_PARK,然后在hotplug线程循环函数smpboot_thread_fn中判...
[c000000f674f7aa0] .cpu_stopper_thread at c0000000001894f8 #5 [c000000f674f7b40] .cpu_stopper_thread+0xd8 at c0000000001894f8 (unreliable) #6 [c000000f674f7c80] .smpboot_thread_fn+0x228 at c00000000010c748 #7 [c000000f674f7d30] .kthread+0xe8 at c0000000000fe528 #8 [c000000f...
static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper); struct smp_hotplug_thread { struct task_struct * __percpu *store; } /* 这样初始化,一个指向per-cpu的二级指针,却指向一个per-cpu变量的一级指针 */ static struct smp_hotplug_thread cpu_stop_threads = { //stop_machine.c .store = ...
84/0xe0 [44369.561846] multi_cpu_stop+0x98/0x148 [44369.561849] cpu_stopper_thread+0xb4/0x170 [44369.561851] smpboot_thread_fn+0x154/0x1d8 [44369.561853] kthread+0x130/0x138 [44369.561857] ret_from_fork+0x10/0x18 [44369.561867] ---[ cut here ]--- [44369.561870] kernel BUG at ...
#10 [ffff887f64cc3db0] cpu_stopper_thread at ffffffff81122ba2 /usr/src/debug/kernel-4.1.12/linux-4.1.12-61.33.1.el6uek/kernel/stop_machine.c: 474 #11 [ffff887f64cc3e80] smpboot_thread_fn at ffffffff810a7f46 /usr/src/debug/kernel-4.1.12/linux-4.1.12-61.33.1.el6uek/kernel/sm...
}/*这样初始化,一个指向per-cpu的二级指针,却指向一个per-cpu变量的一级指针*/staticstructsmp_hotplug_thread cpu_stop_threads = {//stop_machine.c.store = &cpu_stopper.thread, } 2. per-cpu变量做函数参数 void* __percpu *scratches = alloc_percpu(void*); ...
/** migration_cpu_stop - this will be executed by a highprio stopper thread * and performs thread migration by bumping thread off CPU then * 'pushing' onto another runqueue.*/staticintmigration_cpu_stop(void*data) {structmigration_arg *arg =data;structtask_struct *p = arg->task;structrq...
421 /* Unpark the stopper thread and the hotplug thread of the target cpu */ 422 stop_machine_unpark(cpu); 423 kthread_unpark(st->thread); 424 smp/hotplug: Rewrite AP state machine core Sep 20, 2017 425 if (st->target <= CPUHP_AP_ONLINE_IDLE) 426 return 0; 427 428...
We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up Reseting focus {...