From: Eunbyung Park <silverbottlep@gmail.com>
To: Keir Fraser <keir.xen@gmail.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
xen-devel@lists.xensource.com
Subject: Re: deadlock in the credit2
Date: Sat, 15 Oct 2011 13:48:32 +0900 [thread overview]
Message-ID: <4E9910A0.5030002@gmail.com> (raw)
In-Reply-To: <CABDE565.22EF3%keir.xen@gmail.com>
>>> 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
prev parent reply other threads:[~2011-10-15 4:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 9:08 deadlock in the credit2 Eunbyung Park
2011-10-14 11:47 ` George Dunlap
2011-10-14 12:11 ` Keir Fraser
2011-10-15 4:48 ` Eunbyung Park [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E9910A0.5030002@gmail.com \
--to=silverbottlep@gmail.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=keir.xen@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.