[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] timers: move back migrate_timers_from_cpu() invocation



commit 1aec95350ac8261cba516371710d4d837c26f6a0
Author:     Jan Beulich <JBeulich@xxxxxxxx>
AuthorDate: Thu Apr 11 04:45:41 2019 -0600
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Apr 15 17:51:30 2019 +0100

    timers: move back migrate_timers_from_cpu() invocation
    
    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 <jbeulich@xxxxxxxx>
---
 xen/common/timer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/timer.c b/xen/common/timer.c
index f265a362dd..9ee500b3a7 100644
--- a/xen/common/timer.c
+++ b/xen/common/timer.c
@@ -619,8 +619,6 @@ static void free_percpu_timers(unsigned int cpu)
 {
     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;
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.