[Xen-devel] [PATCH] xen/sched: don't disable interrupts all the time when dumping run-queues

Juergen Gross posted 1 patch 4 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/20200219153300.10679-1-jgross@suse.com
xen/common/sched/cpupool.c | 3 ---
1 file changed, 3 deletions(-)
[Xen-devel] [PATCH] xen/sched: don't disable interrupts all the time when dumping run-queues
Posted by Juergen Gross 4 years, 2 months ago
Having interrupts disabled all the time when running dump_runq() is
not necessary. All the called functions are doing proper locking
and disable interrupts if needed.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sched/cpupool.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c
index 476916c6ea..b7721b5d02 100644
--- a/xen/common/sched/cpupool.c
+++ b/xen/common/sched/cpupool.c
@@ -889,12 +889,10 @@ const cpumask_t *cpupool_valid_cpus(const struct cpupool *pool)
 
 void dump_runq(unsigned char key)
 {
-    unsigned long    flags;
     s_time_t         now = NOW();
     struct cpupool **c;
 
     spin_lock(&cpupool_lock);
-    local_irq_save(flags);
 
     printk("sched_smt_power_savings: %s\n",
             sched_smt_power_savings? "enabled":"disabled");
@@ -914,7 +912,6 @@ void dump_runq(unsigned char key)
         schedule_dump(*c);
     }
 
-    local_irq_restore(flags);
     spin_unlock(&cpupool_lock);
 }
 
-- 
2.16.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH] xen/sched: don't disable interrupts all the time when dumping run-queues
Posted by Dario Faggioli 4 years, 2 months ago
On Wed, 2020-02-19 at 16:33 +0100, Juergen Gross wrote:
> Having interrupts disabled all the time when running dump_runq() is
> not necessary. All the called functions are doing proper locking
> and disable interrupts if needed.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
>
As said, I'm fine with this other approach as well. :-)

Reviewed-by: Dario Faggioli <dfaggioli@suse.com>

Regards
-- 
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel