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

Re: [Xen-devel] deadlock in the credit2




if ( d == current->domain )
vcpu_schedule_lock_irq(current);

It was very hard to understan for me..:) What does it exactly mean?
You're asking what "current" means?  "current" is a macro that always
resolves to the vcpu which is running on the current processor.

sched_adjust() seems to be trying to avoid scheduling races in general
by pausing all vcpus before calling the per-scheduler function.  But
if a VM is calling the op on itself, the vcpu making the hypercall
can't pause itself.  So in that case (current->domain == d) will be
true, so sched_adjust() grab the schedule lock of that vm instead.

But really all that locking should be handled in the scheduler
function, not by the generic code.  It knows best what needs to be
locked when.
This was what I really wanted to ask about.
Now I can understand what the generic scheduler code was going to say.
Thanks for your kindness.

--
Best Regards,
Eunbyung Park

_______________________________________________
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®.