From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eunbyung Park Subject: deadlock in the credit2 Date: Fri, 14 Oct 2011 18:08:58 +0900 Message-ID: <4E97FC2A.8080004@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=EUC-KR Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: george.dunlap@eu.citrix.com Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org IMHO, it seems to be deadlock when changing dom0's weight in credit2 scheduler. when the sched_adjust() in schedule.c is called, it grabs the schedule_lock after pausing all of the vcpus and then, csched_dom_cntl in sched_credit2.c, it also grab the schedule_lock by using vcpu_schedule_lock_irq(). In the credit2, all of the percpu schedule_lock points out same runqueue lock if they belong to same runqueue. Eventually, all of vcpu are paused except for itself running the code, and it try to grab schedule_lock that was grabbed by itself. Am I right? If I was wrong, please tell me my misunderstanding. And, I have a question about the code, where are in sched_adjust() in schedule.c if ( d == current->domain ) vcpu_schedule_lock_irq(current); It was very hard to understan for me..:) What does it exactly mean? I would be very grateful for any comments -- Best Regards, Eunbyung Park