All of lore.kernel.org
 help / color / mirror / Atom feed
From: NISHIGUCHI Naoki <nisiguti@jp.fujitsu.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>,
	xen-devel@lists.xensource.com
Cc: Ian.Pratt@eu.citrix.com, disheng.su@intel.com,
	Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [RFC][PATCH] scheduler: credit scheduler for client virtualization
Date: Mon, 08 Dec 2008 17:37:09 +0900	[thread overview]
Message-ID: <493CDCB5.1040004@jp.fujitsu.com> (raw)
In-Reply-To: <de76405a0812050337g9effef1vb0407bc9bd8f7f36@mail.gmail.com>

George Dunlap wrote:
> For basic workload tests, a couple are pretty handy.  vConsolidate is
> a good test, but pretty hard to set up; I should be able to manage it
> with our infrastructure here, though.  Other tests include:
> * kernel-build (i.e., time how long it takes to build the Linux
> kernel) and or ddk-build (Windows equivalent)
> * specjbb (a cpu-intensive workload)
> * netperf (for networks)
> 
> For testing its effect on network, the paper I mentioned has three
> workloads that it combines with different ways:
> * cpu (just busy spinning)
> * sustained network (netbench): throughput
> * network ping: latency.

Thanks! I'll try to prepare.

> I think I understand you to mean: If we set the timer for 10ms, and in
> the mean time another vcpu wakes up and is set at BOOST, then it won't
> get a chance to run for another 10 ms.  And you're suggesting that we
> run the scheduler at 2ms if there are any vcpus that *may* wake up and
> be at BOOST, just in case; and you don't think this situation will
> happen very often.  Is that correct?

Almost that is correct.
I had thought that we run the scheduler at 2ms only if there are vcpus 
that have boost credit and are already at BOOST. But I don't think so now.

> Unfortunately, in consolidated server workloads you're pretty likely
> to have more vcpus than physical cpus, so I think this case would come
> up pretty often.  Furthermore, 2ms is really too short a scheduling
> quantum for normal use, especially for HVM domains, which have to take
> a vmexit/vmenter cycle to handle every interrupt.  (I did some tests
> back when we were using the SEDF scheduler, and the scheduling alone
> was a 4-5% overhead for HVM domains.)

I see.

> But I don't think we actually have a problem here: if a vcpu wakes up
> and is promoted to BOOST, won't it "tickle" the runqueues to find
> somewhere for it to run?  At very least the current cpu should be able
> to run it, or if it's already running one at BOOST, it can set its own
> timer to 2ms.  In any case, I think handling this corner case with
> some extra code is preferrable to running a 2ms timer any time it
> *might* happen.

OK.
I implemented as follows:
- If next running vcpu is at BOOST and first vcpu on run-queue is at 
BOOST, set the timer to 2ms.
- If next running vcpu is at BOOST and first vcpu on run-queue is not at 
BOOST, set the timer to 10ms.
- If next running vcpu is not at BOOST, set the timer to 30ms.
- When a vcpu wakes up, if the vcpu has boost credit then send scheduler 
interrupts to at least one CPU.

In my test environment, it works well.
I'll post last patch today.

Thanks,
Naoki

  reply	other threads:[~2008-12-08  8:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03  8:54 [RFC][PATCH] scheduler: credit scheduler for client virtualization NISHIGUCHI Naoki
2008-12-03  9:16 ` Keir Fraser
2008-12-03 12:46   ` George Dunlap
2008-12-04  7:51     ` NISHIGUCHI Naoki
2008-12-04 12:21       ` George Dunlap
2008-12-04 12:37         ` George Dunlap
2008-12-05  3:17           ` NISHIGUCHI Naoki
2008-12-18  2:49             ` NISHIGUCHI Naoki
2008-12-18 10:21               ` George Dunlap
2008-12-05  2:47         ` NISHIGUCHI Naoki
2008-12-05 11:37           ` George Dunlap
2008-12-08  8:37             ` NISHIGUCHI Naoki [this message]
2008-12-04  7:45   ` NISHIGUCHI Naoki
     [not found] ` <de76405a0901191232k19d910d5o77160fa5ee7bf06c@mail.gmail.com>
     [not found]   ` <de76405a0901191257p3b45304fi538d040b5634de23@mail.gmail.com>
     [not found]     ` <49768FDB.60609@jp.fujitsu.com>
2009-01-21 10:35       ` George Dunlap
2009-01-22  6:15         ` NISHIGUCHI Naoki

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=493CDCB5.1040004@jp.fujitsu.com \
    --to=nisiguti@jp.fujitsu.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Pratt@eu.citrix.com \
    --cc=disheng.su@intel.com \
    --cc=keir.fraser@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.