On 11/04/2019 11:45, Jan Beulich wrote: > Commit 597fbb8be6 ("xen/timers: Fix memory leak with cpu unplug/plug") > went a little too far: Migrating timers away from a CPU being offlined > needs to heppen independent of whether it get parked or fully offlined. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> > > --- a/xen/common/timer.c > +++ b/xen/common/timer.c > @@ -619,8 +619,6 @@ static void free_percpu_timers(unsigned > { > struct timers *ts = &per_cpu(timers, cpu); > > - migrate_timers_from_cpu(cpu); > - > ASSERT(heap_metadata(ts->heap)->size == 0); > if ( heap_metadata(ts->heap)->limit ) > { > @@ -648,6 +646,8 @@ static int cpu_callback( > case CPU_UP_CANCELED: > case CPU_DEAD: > case CPU_RESUME_FAILED: > + migrate_timers_from_cpu(cpu); > + > if ( !park_offline_cpus && system_state != SYS_STATE_suspend ) > free_percpu_timers(cpu); > break;
I'm pretty sure you also need a call in the REMOVE_CASE. The cpu comes online for long enough to potentially gain a timer. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel