All of lore.kernel.org
 help / color / mirror / Atom feed
From: gavin  <gbtux@126.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: A question on the credit scheduler
Date: Fri, 16 Dec 2011 22:44:54 +0800 (CST)	[thread overview]
Message-ID: <676b608e.2fb26.13447553671.Coremail.gbtux@126.com> (raw)
In-Reply-To: <CAFLBxZYM-8vEc5Egmv+iXqMDUE_UJcgHbwr7=71H-kFowTzXWA@mail.gmail.com>


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

At 2011-12-16 19:04:19,"George Dunlap" <George.Dunlap@eu.citrix.com> wrote:>2011/12/16 zhikai <gbtux@126.com>:
>> Hi All,
>>
>> In the credit scheduler, the scheduling decision function csched_schedule()
>> is called in the schedule function in scheduler.c, such as the following.
>> next_slice = sched->do_schedule(sched, now, tasklet_work_scheduled);
>>
>> But, how often the csched_schedule() is called and to run? Does this
>> frequency have something to do with the slice of credit scheduler that is
>> 30ms?
>
>The scheduler runs whenever the SCHEDULE_SOFTIRQ is raised.  If you
>grep through the source code fro that string, you can find all the
>places where it's raised.
>
>Some examples include:
>* When the 30ms timeslice is finished
>* When a sleeping vcpu of higher priority than what's currently running wakes up
>* When a vcpu blocks
>* When a vcpu is migrated from one cpu to another
>
>30ms is actually a pretty long time; in typical workloads, vcpus block
>or are preempted by other waking vcpus without using up their full
>timeslice.


Thank you very much for your reply.
So, the vcpu is very likely to be preempted whenever the SCHEDULE_SOFTIRQ is raised. And we cannot find a small timeslice, such as a(ms), which makes the time any vcpu spending on running phase is k*a(ms), k is integer here. There is no such a small timeslice. Is it right?


Best Regards,
Gavin


>
> -George
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel

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

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

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

  parent reply	other threads:[~2011-12-16 14:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16  7:55 A question on the credit scheduler zhikai
2011-12-16 11:04 ` George Dunlap
2011-12-16 14:44 ` gavin [this message]
2011-12-16 15:58   ` George Dunlap
2011-12-17  9:16   ` gavin
2011-12-19 10:37     ` George Dunlap
2011-12-19 16:13       ` Shriram Rajagopalan
2011-12-20  7:30     ` gavin
2011-12-20 15:49     ` gavin

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=676b608e.2fb26.13447553671.Coremail.gbtux@126.com \
    --to=gbtux@126.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 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.