Re: [patch v3 18/36] [patch V2 18/38] cpu/hotplug: Add CPU state tracking and synchronization

2023-05-09 Thread Thomas Gleixner
On Tue, May 09 2023 at 13:07, Peter Zijlstra wrote: > On Mon, May 08, 2023 at 09:43:55PM +0200, Thomas Gleixner wrote: > >> +static inline void cpuhp_ap_update_sync_state(enum cpuhp_sync_state state) >> +{ >> +atomic_t *st = this_cpu_ptr(&cpuhp_state.ap_sync_state); >> +int sync = atomic_re

Re: [patch v3 18/36] [patch V2 18/38] cpu/hotplug: Add CPU state tracking and synchronization

2023-05-09 Thread Peter Zijlstra
On Tue, May 09, 2023 at 01:07:23PM +0200, Peter Zijlstra wrote: > On Mon, May 08, 2023 at 09:43:55PM +0200, Thomas Gleixner wrote: > > > +static inline void cpuhp_ap_update_sync_state(enum cpuhp_sync_state state) > > +{ > > + atomic_t *st = this_cpu_ptr(&cpuhp_state.ap_sync_state); > > + int s

Re: [patch v3 18/36] [patch V2 18/38] cpu/hotplug: Add CPU state tracking and synchronization

2023-05-09 Thread Peter Zijlstra
On Mon, May 08, 2023 at 09:43:55PM +0200, Thomas Gleixner wrote: > +static inline void cpuhp_ap_update_sync_state(enum cpuhp_sync_state state) > +{ > + atomic_t *st = this_cpu_ptr(&cpuhp_state.ap_sync_state); > + int sync = atomic_read(st); > + > + while (!atomic_try_cmpxchg(st, &sync,

[patch v3 18/36] [patch V2 18/38] cpu/hotplug: Add CPU state tracking and synchronization

2023-05-08 Thread Thomas Gleixner
From: Thomas Gleixner The CPU state tracking and synchronization mechanism in smpboot.c is completely independent of the hotplug code and all logic around it is implemented in architecture specific code. Except for the state reporting of the AP there is absolutely nothing architecture specific a

[patch V2 18/38] cpu/hotplug: Add CPU state tracking and synchronization

2023-05-04 Thread Thomas Gleixner
From: Thomas Gleixner The CPU state tracking and synchronization mechanism in smpboot.c is completely independent of the hotplug code and all logic around it is implemented in architecture specific code. Except for the state reporting of the AP there is absolutely nothing architecture specific a