Thread (10 messages) 10 messages, 4 authors, 2019-08-22

Re: [PATCH v2 2/3] powerpc/rtas: allow rescheduling while changing cpu states

flat view

From: Gautham R Shenoy <hidden>
Date: 2019-08-13 17:19:29

On Sat, Aug 3, 2019 at 1:03 AM Nathan Lynch [off-list ref] wrote:
rtas_cpu_state_change_mask() potentially operates on scores of cpus,
so explicitly allow rescheduling in the loop body.
Are we seeing softlockups/rcu stalls while running this ?
Signed-off-by: Nathan Lynch <redacted>
Reviewed-by: Gautham R. Shenoy <redacted>
quoted hunk ↗ jump to hunk
---
 arch/powerpc/kernel/rtas.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 05824eb4323b..b7ca2fde68a9 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -16,6 +16,7 @@
 #include <linux/capability.h>
 #include <linux/delay.h>
 #include <linux/cpu.h>
+#include <linux/sched.h>
 #include <linux/smp.h>
 #include <linux/completion.h>
 #include <linux/cpumask.h>
@@ -898,6 +899,7 @@ static int rtas_cpu_state_change_mask(enum rtas_cpu_state state,
                                cpumask_clear_cpu(cpu, cpus);
                        }
                }
+               cond_resched();
        }

        return ret;
--
2.20.1

-- 
Thanks and Regards
gautham.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help