Re: [PATCH] Drop CONFIG_SCHED_MC

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

 




On Wed, 1 Jun 2022, Mikulas Patocka wrote:

> 
> 
> On Tue, 31 May 2022, Helge Deller wrote:
> 
> > Mikulas noticed that the parisc kernel crashes in sd_init() if
> > CONFIG_SCHED_MC is enabled.
> > Multicore-scheduling is probably not very useful on parisc, so simply
> > drop this option.
> > 
> > Signed-off-by: Helge Deller <deller@xxxxxx>
> > Noticed-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>
> > Cc: <stable@xxxxxxxxxxxxxxx> # 5.18
> 
> Hi
> 
> I think that we should fix the root cause instead of trying to treat the 
> symptoms.
> 
> Some more testing showed that:
> 
> in sd_init: tl->mask(cpu) returns an empty mask
> tl->mask is cpu_coregroup_mask
> in cpu_coregroup_mask: cpu_topology[cpu].core_sibling is an empty mask, 
> that gets returned to sd_init
> 
> In arch/parisc/kernel/topology.c:
> init_cpu_topology is called before store_cpu_topology, but it depends on 
> the variable dualcores_found being set by store_cpu_topology. Thus, it is 
> not set.
> 
> store_cpu_topology returns if cpuid_topo->core_id != -1, but during boot, 
> store_cpu_topology is called before reset_cpu_topology, thus the member 
> "core_id" is uninitialized zero and store_cpu_tolopogy does nothing.
> 
> If these issues are addrssed, multicore scheduling will work.

I've found that this fixes it.

Mikulas


---
 arch/parisc/kernel/topology.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/parisc/kernel/topology.c
===================================================================
--- linux-2.6.orig/arch/parisc/kernel/topology.c	2022-06-01 15:32:59.000000000 +0200
+++ linux-2.6/arch/parisc/kernel/topology.c	2022-06-01 16:47:36.000000000 +0200
@@ -95,7 +95,8 @@ static struct sched_domain_topology_leve
  */
 void __init init_cpu_topology(void)
 {
+	reset_cpu_topology();
 	/* Set scheduler topology descriptor */
-	if (dualcores_found)
+	/*if (dualcores_found)*/
 		set_sched_topology(parisc_mc_topology);
 }




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux