From: Dulloor <dulloor@gmail.com>
To: George Dunlap <george.dunlap@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Keir Fraser <Keir.Fraser@eu.citrix.com>
Subject: Re: Re: [PATCH] [RFC] Credit2 scheduler prototype
Date: Thu, 28 Jan 2010 18:27:44 -0500 [thread overview]
Message-ID: <940bcfd21001281527j257e9389w8ff8cb8e311aecc9@mail.gmail.com> (raw)
In-Reply-To: <4B4DF825.1090100@eu.citrix.com>
George,
With your patches and sched=credit2, xen crashes on a failed assertion :
(XEN) ****************************************
(XEN) Panic on CPU 1:
(XEN) Assertion '_spin_is_locked(&(*({ unsigned long __ptr; __asm__ ("" : "=r"(*
(XEN)
Is this version supposed to work (or is it just some reference code) ?
thanks
dulloor
On Wed, Jan 13, 2010 at 11:43 AM, George Dunlap
<george.dunlap@eu.citrix.com> wrote:
> Keir Fraser wrote:
>>
>> On 13/01/2010 16:05, "George Dunlap" <George.Dunlap@eu.citrix.com> wrote:
>>
>>
>>>
>>> [NB that the current global lock will eventually be replaced with
>>> per-runqueue locks.]
>>>
>>> In particular, one of the races without the first flag looks like this
>>> (brackets indicate physical cpu):
>>> [0] lock cpu0 schedule lock
>>> [0] lock credit2 runqueue lock
>>> [0] Take vX off runqueue; vX->processor == 1
>>> [0] unlock credit2 runqueue lock
>>> [1] vcpu_wake(vX) lock cpu1 schedule lock
>>> [1] finds vX->running false, adds it to the runqueue
>>> [1] unlock cpu1 schedule_lock
>>>
>>
>> Actually, hang on. Doesn't this issue, and the one that your second patch
>> addresses, go away if we change the schedule_lock granularity to match
>> runqueue granularity? That would seem pretty sensible, and could be
>> implemented with a schedule_lock(cpu) scheduler hook, returning a
>> spinlock_t*, and a some easy scheduler code changes.
>>
>> If we do that, do you then even need separate private per-runqueue locks?
>> (Just an extra thought).
>>
>
> Hmm.... can't see anything wrong with it. It would make the whole locking
> discipline thing a lot simpler. It would, AFAICT, remove the need for
> private per-runqueue locks, which make it a lot harder to avoid deadlock
> without these sorts of strange tricks. :-)
>
> I'll think about it, and probably give it a spin to see how it works out.
>
> -George
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
next prev parent reply other threads:[~2010-01-28 23:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 17:02 [PATCH] [RFC] Credit2 scheduler prototype George Dunlap
2009-12-07 17:45 ` Keir Fraser
2009-12-08 14:48 ` George Dunlap
2009-12-08 18:20 ` Keir Fraser
2010-01-13 14:48 ` George Dunlap
2010-01-13 15:16 ` Keir Fraser
2010-01-13 16:05 ` George Dunlap
2010-01-13 16:36 ` Keir Fraser
2010-01-13 16:43 ` George Dunlap
2010-01-28 23:27 ` Dulloor [this message]
2010-01-29 0:56 ` George Dunlap
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=940bcfd21001281527j257e9389w8ff8cb8e311aecc9@mail.gmail.com \
--to=dulloor@gmail.com \
--cc=Keir.Fraser@eu.citrix.com \
--cc=george.dunlap@eu.citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).