[PATCH 1/2] powerpc/rtas: use device model APIs and serialization during LPM

Nathan Lynch nathanl at linux.ibm.com
Fri Jul 19 05:46:43 AEST 2019


Nathan Lynch <nathanl at linux.ibm.com> writes:

> During LPAR migration, cpu hotplug and migration operations can
> interleave like so:
>
> cd /sys/devices/system/cpu/cpu7/ | drmgr -m -c pmig -p pre \
> echo 0 > online                  | -s 0xd7a884f83d830e6d -t 19 \
> echo 1 > online                  | -n -d 1 5
> ---------------------------------+-------------------------------------------
> online_store() {                 |
>   device_offline() {             |
>     cpu_subsys_offline() {       |
>       cpu_down(7);               |
>     }                            |
>     dev->offline = true;         |
>   }                              | migration_store() {
> }                                |   rtas_ibm_suspend_me() {
>                                  |     rtas_online_cpus_mask() {
>                                  |       cpu_up(7);
> 				 |     }
>                                  |     cpu_hotplug_disable();
>                                  |     on_each_cpu(rtas_percpu_suspend_me());
>                                  |     cpu_hotplug_enable();
> online_store() {                 |
>   device_online() {              |
>     cpu_subsys_online() {        |
>       cpu_up(7);                 |
>     }                            |
>     dev->offline = false;        |
>   }                              |     rtas_offline_cpus_mask() {
> }                                |       rtas_cpu_state_change_mask() {
>                                  |         cpu_down(7);
> 				 |       }
> 				 |     }
> 				 |   }
> 				 | }

Actually I think this isn't a correct depiction of the race. I'll
rewrite and resend.



More information about the Linuxppc-dev mailing list