All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Dario Faggioli <raistlin@linux.it>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"Keir (Xen.org)" <keir@xen.org>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	"Dong, Eddie" <eddie.dong@intel.com>,
	"Lv, Hui" <hui.lv@intel.com>,
	"Duan, Jiangang" <jiangang.duan@intel.com>
Subject: RE: [PATCH] scheduler rate controller
Date: Fri, 28 Oct 2011 17:18:34 +0100	[thread overview]
Message-ID: <1319818714.21033.414.camel@elijah> (raw)
In-Reply-To: <1319796584.19320.31.camel@Abyss>

On Fri, 2011-10-28 at 11:09 +0100, Dario Faggioli wrote:
> Not sure yet, I can imagine it's tricky and I need to dig a bit more in
> the code, but I'll let know if I found a way of doing that...

There are lots of reasons why the SCHEDULE_SOFTIRQ gets raised.  But I
think we want to focus on the scheduler itself raising it as a result of
the .wake() callback.  Whether the .wake() happens as a result of a HW
interrupt or something else, I don't think really matters.

Dario and Hui,  neither of you have commented on my idea, which is
simply don't preempt a VM if it has run for less than some amount of
time (say, 500us or 1ms).  If a higher-priority VM is woken up, see how
long the current VM has run.  If it's less than 1ms, set a 1ms timer and
call schedule() then.

> > > More generally speaking, I see how this feature can be useful, and I
> > > also think it could live in the generic schedule.c code, but (as George
> > > was saying) the algorithm by which rate-limiting is happening needs to
> > > be well known, documented and exposed to the user (more than by means
> > > of a couple of perf-counters).
> > > 
> > 
> > One question is that, what is the right palace to document such information? I'd like to make it as clear as possible to the users.
> > 
> Well, don't know, maybe a WARN (a WARN_ONCE alike thing would probably
> be better), or in general something that leave a footstep in the logs,
> so that one can find out by means of `xl dmesg' or related. Obviously,
> I'm not suggesting of printk-ing each suppressed schedule invocation, or
> the overhead would get even worse... :-P
> 
> I'm thinking of something that happens the very first time the limiting
> fires, or maybe oncee some period/number of suppressions, just to remind
> the user that he's getting weird behaviour because _he_enabled_
> rate-limiting. Hopefully, that might also be useful for the user itself
> to fine tune the limiting parameters, although I think the perf-counters
> are already quite well suited for this.

As much as possible, we want the system to Just Work.  Under normal
circumstances it wouldn't be too unusual for a VM to have a several-ms
delay between receiving a physical interrupt and being scheduled; I
think that if the 1ms delay works, having it on all the time would
probably be the best solution.  That's another reason I'm in favor of
trying it -- it's simple and easy to understand, and doesn't require
detecting when to "turn it on".

 -George

  reply	other threads:[~2011-10-28 16:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24  3:36 [PATCH] scheduler rate controller Lv, Hui
2011-10-24 16:17 ` George Dunlap
2011-10-24 16:57   ` Keir Fraser
2011-10-24 21:20   ` Dario Faggioli
2011-10-25  7:57   ` Dario Faggioli
2011-10-28  2:07   ` Lv, Hui
2011-10-28  8:10     ` Dario Faggioli
2011-10-28  8:52       ` Lv, Hui
2011-10-28 10:09         ` Dario Faggioli
2011-10-28 16:18           ` George Dunlap [this message]
2011-10-29  2:05             ` Lv, Hui
2011-10-31 10:16               ` Dario Faggioli
2011-11-03  4:28               ` George Dunlap
2011-11-04 14:08                 ` Lv, Hui
2011-11-14 15:22                   ` George Dunlap
2011-11-14 15:30                   ` George Dunlap
2011-11-28 17:31                 ` Lv, Hui
2011-12-01 17:13                   ` George Dunlap
2011-12-11 15:27                     ` Lv, Hui
2011-12-12 11:43                       ` George Dunlap
2011-12-13  2:24                         ` Lv, Hui
2011-10-31  9:59             ` Dario Faggioli

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=1319818714.21033.414.camel@elijah \
    --to=george.dunlap@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=hui.lv@intel.com \
    --cc=jiangang.duan@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=raistlin@linux.it \
    --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.