|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [PATCH v2] xen/arm: Fix sibling mask setup to only include online CPUs
Hi, Michal
> > Populate the CPU sibling map only with CPUs that are brought
> > online. Currently, all CPUs in cpu_possible_map are added,
> > which leaves CPUs that failed to boot in the sibling masks and
> > may lead the scheduler to make incorrect decisions.
> >
> > Changes in v2:
> This should be moved after '---'
I will fix it.
> > --- a/xen/arch/arm/smpboot.c
> > +++ b/xen/arch/arm/smpboot.c
> > @@ -91,15 +91,27 @@ static int setup_cpu_sibling_map(int cpu)
> > !zalloc_cpumask_var(&per_cpu(cpu_core_mask, cpu)) )
> > return -ENOMEM;
> >
> > + return 0;
> > +}
> > +
> > +static void set_cpu_sibling_map(int cpu)
> unsigned as on x86?
In x86 Xen, the cpu parameter type in the sibling mask helper functions is a
mix of
'int' and 'unsigned int'.
It seems 'unsigned int' will be better for ARM Xen.
x86 > static void remove_siblinginfo(int cpu)
x86 > static void set_cpu_sibling_map(unsigned int cpu)
x86 > static void cpu_smpboot_free(unsigned int cpu, bool remove)
> > +{
> > + unsigned int sibling;
> > +
> > + BUG_ON (!per_cpu(cpu_sibling_mask, cpu));
> there should be no space between BUG_ON and parenthesis
Okay.
> > + BUG_ON (!per_cpu(cpu_core_mask, cpu));
> > +
> > /*
> > * Currently we assume there is no multithread and NUMA, so
> > * a CPU is a sibling with itself, and the all possible CPUs
> your change switches to online, so a comment should be updated
Okay.
> > * are supposed to belong to the same socket (NUMA node).
> > */
> > cpumask_set_cpu(cpu, per_cpu(cpu_sibling_mask, cpu));
> > - cpumask_copy(per_cpu(cpu_core_mask, cpu), &cpu_possible_map);
> > + cpumask_copy(per_cpu(cpu_core_mask, cpu), &cpu_online_map);
> > + cpumask_set_cpu(cpu, per_cpu(cpu_core_mask, cpu));
> >
> > - return 0;
> > + for_each_online_cpu(sibling)
> > + cpumask_set_cpu(cpu, per_cpu(cpu_core_mask, sibling));
> With your change I think we should remove the cpu that is being removed from
> its
> every sibling's cpu_core_mask on CPU_DEAD.
Okay, I will implement it.
Thank you,
Hirokazu Takahashi.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |