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

Re: [Xen-devel] [PATCH 1/6] xen/sched: call cpu_disable_scheduler() via cpu notifier



>>> On 27.03.19 at 17:45, <jgross@xxxxxxxx> wrote:
> On 27/03/2019 17:22, Jan Beulich wrote:
>> Also while indeed (as the description says) there's no need to
>> run the function on the CPU itself, it's not obvious to me that
>> it's safe to run it outside of stop_machine() context. Or to be
>> more precise, it's not clear to me that leaving stop_machine()
>> context with the adjustments not done yet is not going to
>> lead to problems (due to the gap between leaving that context
>> and acquiring the RCU lock). Could you clarify this in the
>> description, please (if it indeed is fine this way)?
> 
> It is fine, as the chances are zero that any code will run on the cpu
> just taken down and that cpu is not holding any locks we might need.

Well, of course nothing's going to run on that CPU anymore.
But vCPU-s may still have associations with it, so what I'm
worried about is e.g. something finding v->processor pointing
at an offline CPU and getting confused. Another, more exotic
(or should I say contrived) scenario might be a soft-online
request coming very quickly after a prior soft-offline one, with
this function not having got around to run yet. Or basically
anything else that accesses the same state the function
means to update (or use).

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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