WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] deadlock in the credit2

To: Keir Fraser <keir.xen@xxxxxxxxx>
Subject: Re: [Xen-devel] deadlock in the credit2
From: Eunbyung Park <silverbottlep@xxxxxxxxx>
Date: Sat, 15 Oct 2011 13:48:32 +0900
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 14 Oct 2011 21:49:30 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PaKh2+v/KnbqvatksG3G9eDt+UoM/K1tlOT/p1Sf1nc=; b=xZtIEnM7HyeGsTPQABqaxu7DNK7nncUoXAlKE/uqL1V8MUZh88oJ18YCA0XuRcx42m xhHWi2LT2MVO3tbwyZGgcDsnEUJtmBoYy/MDcOacAlB8oqBZWn19STR1VC6sxIqALro/ cUu4k6G2VP8Aaj8h5TAvXfi4qAHTG37gsDcu4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CABDE565.22EF3%keir.xen@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CABDE565.22EF3%keir.xen@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

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

<Prev in Thread] Current Thread [Next in Thread>