Power management operations using ACPI can trigger a context switch using kernel migration thread on isolated CPUs
Issue
The isolated CPUs experience a context switch to migration kernel thread and back like this:
snippet from ftrace function_graph plugin trace
...
<...>-60731 [005] 369249.338552: funcgraph_entry: | __context_tracking_task_switch() {
<...>-60731 [005] 369249.338552: funcgraph_exit: 0.055 us | }
migration/5-35 [005] 369249.338553: funcgraph_entry: | finish_task_switch() {
migration/5-35 [005] 369249.338553: funcgraph_entry: | vtime_common_task_switch() {
migration/5-35 [005] 369249.338553: funcgraph_entry: | vtime_account_system() {
migration/5-35 [005] 369249.338553: funcgraph_exit: 0.024 us | }
migration/5-35 [005] 369249.338553: funcgraph_entry: | arch_vtime_task_switch() {
migration/5-35 [005] 369249.338553: funcgraph_exit: 0.024 us | }
migration/5-35 [005] 369249.338553: funcgraph_exit: 0.477 us | }
migration/5-35 [005] 369249.338553: funcgraph_entry: | __tick_nohz_task_switch() {
migration/5-35 [005] 369249.338553: funcgraph_exit: 0.036 us | }
migration/5-35 [005] 369249.338554: funcgraph_exit: 0.948 us | }
migration/5-35 [005] 369249.338554: funcgraph_exit: # 881477.781 us | }
migration/5-35 [005] 369249.338554: funcgraph_exit: # 881478.008 us | }
migration/5-35 [005] 369249.338554: funcgraph_entry: | kthread_should_stop() {
migration/5-35 [005] 369249.338554: funcgraph_exit: 0.023 us | }
migration/5-35 [005] 369249.338554: funcgraph_entry: | kthread_should_park() {
migration/5-35 [005] 369249.338554: funcgraph_exit: 0.021 us | }
migration/5-35 [005] 369249.338554: funcgraph_entry: | cpu_stop_should_run() {
migration/5-35 [005] 369249.338555: funcgraph_entry: | _raw_spin_lock_irqsave() {
migration/5-35 [005] 369249.338555: funcgraph_exit: 0.027 us | }
migration/5-35 [005] 369249.338555: funcgraph_entry: | _raw_spin_unlock_irqrestore() {
migration/5-35 [005] 369249.338555: funcgraph_exit: 0.029 us | }
migration/5-35 [005] 369249.338555: funcgraph_exit: 0.480 us | }
migration/5-35 [005] 369249.338555: funcgraph_entry: | cpu_stopper_thread() {
migration/5-35 [005] 369249.338555: funcgraph_entry: | _raw_qspin_lock_irq() {
migration/5-35 [005] 369249.338555: funcgraph_exit: 0.023 us | }
migration/5-35 [005] 369249.338556: funcgraph_entry: | synchronize_sched_expedited_cpu_stop() {
migration/5-35 [005] 369249.338556: funcgraph_exit: 0.032 us | }
migration/5-35 [005] 369249.338556: funcgraph_entry: | cpu_stop_signal_done() {
migration/5-35 [005] 369249.338556: funcgraph_exit: 0.060 us | }
migration/5-35 [005] 369249.338556: funcgraph_entry: | _raw_qspin_lock_irq() {
migration/5-35 [005] 369249.338556: funcgraph_exit: 0.024 us | }
migration/5-35 [005] 369249.338556: funcgraph_exit: 1.051 us | }
migration/5-35 [005] 369249.338556: funcgraph_entry: | kthread_should_stop() {
migration/5-35 [005] 369249.338557: funcgraph_exit: 0.022 us | }
migration/5-35 [005] 369249.338557: funcgraph_entry: | kthread_should_park() {
migration/5-35 [005] 369249.338557: funcgraph_exit: 0.023 us | }
migration/5-35 [005] 369249.338557: funcgraph_entry: | cpu_stop_should_run() {
migration/5-35 [005] 369249.338557: funcgraph_entry: | _raw_spin_lock_irqsave() {
migration/5-35 [005] 369249.338557: funcgraph_exit: 0.024 us | }
migration/5-35 [005] 369249.338557: funcgraph_entry: | _raw_spin_unlock_irqrestore() {
migration/5-35 [005] 369249.338557: funcgraph_exit: 0.026 us | }
migration/5-35 [005] 369249.338557: funcgraph_exit: 0.482 us | }
migration/5-35 [005] 369249.338558: funcgraph_entry: | schedule() {
...
The only function that migration thread executes is synchronize_sched_expedited_cpu_stop()
.
Environment
- Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.