All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Manohar Vanga <manohar.vanga@gmail.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: Problem with simple scheduler
Date: Thu, 2 Jan 2014 11:16:30 +0000	[thread overview]
Message-ID: <52C54A8E.9070100@citrix.com> (raw)
In-Reply-To: <CAEktxaFL=3cmU4vZS2akiAR2vG-3d+9HwTZvBvf5JXuThHoOKg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2014 bytes --]

On 02/01/14 10:37, Manohar Vanga wrote:
> Hi Andrew,
>
> Thanks for the quick reply! My comments are inline:
>  
>
>     Using printk()s in the code is going to skew the timing terribly.
>
>
> Would this affect the boot process of dom0 in any way? Other than
> that, it doesn't seem like it would cause any problems right?

Not directly, but it means the symptoms are likely to change simply by
looking for them.

>  
>
>     A serial console and the 'q' debug key is probably a good start,
>     to see some vcpu state.
>
>
> I'll give this a try but the problem is that I'm not entirely sure
> what I'm looking for. As I mentioned, the vcpu of dom0 goes idle after
> the crash-point.

The pause_count and pause_flags are what you are looking for to start with.

>  
>
>     Beyond that, writing a custom keyhandler to dump all of the xfair
>     state is probably the next thing to try.
>
>
> Hmm any hints on what I should be looking for? It's clear to me that
> the vcpu goes idle after that point where dom0 stops booting. Is there
> anything else I need to keep an eye out for? I'll also look into
> whether the skewed timing can possibly lead to a broken dom0 boot.

You have cause and effect mixed up.  (Presumably) the scheduler makes a
mistake and fails to reschedule dom0's vcpu, at which point dom0 makes
no further progress booting.

You will need to work out why the scheduler is not rescheduling the
vcpu, which involves knowing the complete state of the scheduler, and
the vcpu scheduling information.

>
> Also, in case you glanced at the code, do you happen to see any
> glaringly obvious bugs that you might have encountered? Otherwise I
> guess I'm looking for some odd corner-case behavior.

Writing a scheduler is probably the single most complicated task
available.  It is absolutely full of subtle logic issues which are not
obvious in the slightest.

I have no specific knowledge about schedulers or writing them, so really
cant help you too much with the specifics of your code.

~Andrew

[-- Attachment #1.2: Type: text/html, Size: 4924 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2014-01-02 11:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02  6:46 Problem with simple scheduler Manohar Vanga
2014-01-02  9:59 ` Andrew Cooper
2014-01-02 10:37   ` Manohar Vanga
2014-01-02 11:16     ` Andrew Cooper [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=52C54A8E.9070100@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=manohar.vanga@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /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.