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

Re: [Xen-devel] credit2's csched_init() registering of a CPU notifier



>>> On 18.03.11 at 10:24, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:
> George,
> 
> as ->init() can be called more than once (for CPU pools) it seems
> wrong to do any global initialization in ->init(). The question is
> whether it's worth adding a ->global_init(), or whether instead
> a callout from the notifier schedule.c sets up wouldn't be a
> better mechanism (though that would require maintaining a list
> of scheduler instances).

Just moving this onto a global_init doesn't work (crashes), and
looking at what the notifier handler does I wonder why it's
needed at all - csched_alloc_pdata() also calls init_pcpu(), and
that ought to be the canonical way. Plus there's also this
somewhat frightening comment "Hope this is safe from cpupools
switching things around. :-)" in csched_cpu_starting().
Minimally I think there needs to be a check that *ops really is
credit2's.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.