|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 2/3] sched_credit2.c : runqueue_per_core code
On Thu, 2015-03-12 at 16:21 +0000, Jan Beulich wrote:
> >>> On 12.03.15 at 15:57, <uma.sharma523@xxxxxxxxx> wrote:
> > @@ -1940,10 +1946,14 @@ static void init_pcpu(const struct scheduler *ops,
> > int cpu)
> >
> > /* Figure out which runqueue to put it in */
> > /* NB: cpu 0 doesn't get a STARTING callback, so we hard-code it to
> > runqueue 0. */
> > - if ( cpu == 0 )
> > - rqi = 0;
> > + if ( opt_credit2_runqueue == CREDIT2_OPT_RUNQUEUE_SOCKET )
> > + {
> > + rqi = (cpu) ? cpu_to_socket(cpu) : boot_cpu_to_socket();
> > + }
> > else
> > - rqi = cpu_to_socket(cpu);
> > + {
> > + rqi = (cpu) ? cpu_to_core(cpu) : boot_cpu_to_core();
> > + }
>
> Rather than extending the bad assumption of CPU 0 being the boot
> CPU (What if it gets offlined and this or another one onlined back
> as CPU 0?), can't you find a way to avoid depending on the numeric
> value of "cpu"?
>
BTW, while we're here, can we really offline CPU#0? I haven't played
much with CPU on/offlining, so sorry if I'm asking something obvious...
But I found this, which looks to be working:
http://lxr.free-electrons.com/source/Documentation/ABI/testing/sysfs-devices-system-xen_cpu
Which explicitly says "except cpu0 due to several logic restrictions and
assumptions."
Note that I'm not asking because I think we shouldn't try to make this
more abstract, I'm much rather looking for a way to test the case of the
boot cpu being offlined. :-)
Thanks and Regards,
Dario
Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |