All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	"Tian, Kevin" <kevin.tian@intel.com>,
	xen-devel@lists.xensource.com
Subject: Re: [RFC] Scheduler work, part 1: High-level goals and interface.
Date: Fri, 17 Apr 2009 07:55:38 -0700	[thread overview]
Message-ID: <49E8986A.6080806@goop.org> (raw)
In-Reply-To: <0cb0dd28-7285-4cba-b414-4442030fb446@default>

Dan Magenheimer wrote:
>> In any case, it's a bit like asking, "Why would I buy
>> a machine with two hyperthreads instead of two cores?"
>>     
>
> Yes.  In a physical machine, the OS takes advantage of all
> resources available.  So it doesn't matter if some of the
> "processors" are cores and some are hyperthreads.  You
> are using ALL of the CPU resources you paid for.
>
> But in a virtualized environment, each VM gets a fraction
> of the resources and if grabbing some fixed number of
> "processors" sometimes gets hyperthreads and sometimes
> gets cores, this will cause interesting issues for some
> workloads.
>
> Think about a cloud where one pays for resources used.
> You likely would demand to pay less for a hyperpair than
> a non-vht pair.
>
> As a result, I think it will be a requirement that
> a system administrator be able to specify "I want two
> FULL cores" vs "I am willing to accept two hyperthreads".
> And once you get beyond hyperpairs, this is going to
> get very messy.
>   

I think you're over-complicating it.  At very worst, it will be no worse 
than the current situation where Xen will place the vcpus on 
threads/cores in more or less arbitrary ways.

I think George's proposal can already accommodate the user needs you're 
talking about:

If the scheduler accounts for time spent executing on a contended HT 
thread (ie, the threads are not paired, so the other thread could be 
idle or running any other code) at a lesser rate than a full 
core/uncontended thread, then the charging works out.

If the user has a requirement that domain X's vcpus must be running at 
full speed, then they can set their reservation to 100%.  If we say that 
a contended HT thread is only worth, say, 70% of a "real" core, then 
that not only factors into the charging, but also means that any domain 
with a reservation > 70% is ineligible to run on a contended HT thread.  
(I think in practise this means that any domain with high reservations 
will end up running on gang scheduled thread pairs, just to guarantee 
that the other thread is idle, so the uncontended HT thread can run at 
100%.)

(Another way to look at it is that HT contention is a bit like having 
your vcpu being preempted by Xen, but rather than going from 100% 
running to 0% running, your vcpu drops to 70%.)

    J

  reply	other threads:[~2009-04-17 14:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 15:58 [RFC] Scheduler work, part 1: High-level goals and interface George Dunlap
2009-04-09 18:41 ` Jeremy Fitzhardinge
2009-04-10  0:33   ` Tian, Kevin
2009-04-10 16:15     ` Jeremy Fitzhardinge
2009-04-10 17:16       ` Ian Pratt
2009-04-10 17:19         ` Jeremy Fitzhardinge
2009-04-11 10:00           ` Tian, Kevin
2009-04-15 15:47             ` George Dunlap
2009-04-15 13:54           ` George Dunlap
2009-04-15 16:23             ` Jeremy Fitzhardinge
2009-04-10 17:34         ` Jeremy Fitzhardinge
2009-04-11  9:57         ` Tian, Kevin
2009-04-11 17:11           ` Ian Pratt
2009-04-12  6:27             ` Tian, Kevin
2009-04-11  9:52       ` Tian, Kevin
2009-04-15 15:56         ` George Dunlap
2009-04-16  5:11           ` Tian, Kevin
2009-04-16 10:27             ` George Dunlap
2009-04-16 14:10               ` Dan Magenheimer
2009-04-16 16:32                 ` Jeremy Fitzhardinge
2009-04-16 18:20                   ` Andrew Lyon
2009-04-16 18:28                     ` Jeremy Fitzhardinge
2009-04-17 10:17                 ` George Dunlap
2009-04-17 14:13                   ` Dan Magenheimer
2009-04-17 14:55                     ` Jeremy Fitzhardinge [this message]
2009-04-17 15:55                       ` Dan Magenheimer
2009-04-17 16:17                         ` Jeremy Fitzhardinge
2009-04-17 16:46                           ` Dan Magenheimer
2009-04-17 17:05                           ` George Dunlap
2009-04-17 10:02               ` Tian, Kevin
2009-04-15 14:29   ` George Dunlap
2009-04-10  0:15 ` Tian, Kevin
2009-04-15 15:07   ` George Dunlap
2009-04-16  4:58     ` Tian, Kevin
2009-04-10  2:28 ` Zhiyuan Shao

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=49E8986A.6080806@goop.org \
    --to=jeremy@goop.org \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=kevin.tian@intel.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.