All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mats Petersson <mats@planetcatfish.com>
To: Atsushi SAKAI <sakaia@jp.fujitsu.com>, pak333@comcast.net
Cc: xen-devel@lists.xensource.com
Subject: Re: Credit scheduler
Date: Fri, 13 Jul 2007 19:11:45 +0100	[thread overview]
Message-ID: <4697c092.2533440a.3832.3c81@mx.google.com> (raw)
In-Reply-To: <200707130730.l6D7UnJg008878@fjmscan502.ms.jp.fujitsu.com>

At 08:30 13/07/2007, Atsushi SAKAI wrote:
>Hi, Prabha
>
>pak333@comcast.net wrote:
>
>[snip]
>
> > > >Also, if the IO VM requests an IO, it will block and dom0 wakes up
> > > >and gets scheduled to run to service the IO. Will it preempt the cpu
> > > >intensive VM. If so why? Shouldn't the cpuintensiveV M get its
> > > >quantum of time.
> > > >Or does the IOVM get higher priority to preempt the cpu intensive
> > > >VM. How does the scheduler pick which cpu to run dom0 on ( if all
> > > >the vcpus running are cpu intensive)? If there is a mix of cpu-vcpus
> > > >and Io-vcpus, which will be the victim
> > >
> > >
> > > The whole idea of having separate queues for IO and CPU intensive VMs
> > > (or processes in a normal kernel scenario) is to allow the
> > > IO-intensive tasks to avoid waiting for the next time-slot when a
> > > CPU-hogging VM/process is running [1]. The normal behaviour for the
> > > scheduler is to determine dynamically if the current VM/process is IO
> > > or CPU intensive.
> > >
> > > Unless Dom0 is used for doing some silly CPU-intensive task
> > > (calculating PI with a million decimal points or compiling Xen +
> > > Linux kernel, for example), it will most likely look to the scheduler
> > > like a IO-intensive VM. So it will have the same priority as any
> > > other IO-intensive VM (assuming Dom0 has equal scheduler parameters
> > > as other guests, which I'm pretty sure is the default behaviour).
> > >
> > Does dom0 have a higher pritority than any CPU intensive VM
>
>Easy way is to set higher weight to dom0.
>(This makes get higher priority like I/O intensive domain for domain
>dispatch)
>
>If you want to set higher priority of Dom0 see follow patch.
>(This is sample patch for boost Dom0 only not boost I/O intensive.)
>http://lists.xensource.com/archives/html/xen-devel/2007-05/msg00529.html
>
>Or just set  CSCHED_PRI_TS_BOOST   for domain0
>in case dom0 priority is  CSCHED_PRI_TS_UNDER.
>
>
> > > If, like in your example, there are a number of processors busy with
> > > CPU-intensive tasks, and others with IO-intensive tasks, the most
> > > likely scenario is that any new IO-request will go be run on a
> > > "previously CPU-intensive" CPU - but on the other hand, if you have a
> > > lot of IO-intensive processing, there should be some processor(s)
> > > that are "asleep" - unless all CPU's are busy running 
> CPU-intensive tasks...
> > But will it preempt a CPU intensive vcpu if no cpu is available
>
>[snip]
>
> > >
> > > [1] The idea being that if we process the IO-request that just
> > > completed, we can set up another IO-request, and this will get better
> > > IO-throughput than waiting a long time (relatively speaking 30ms is
> > > an eternity to the processor).
> > Don't understand what you mean here.
>
>I guess Mats suggests to use AIO.

Well, sort of. I meant the idea behind waking an IO-intensive process 
by pre-empting a CPU intensive process is that it improves the 
overall IO throughput, because very often, once one IO request is 
completed, another one will be requested. Hardware will take some 
time to proces each request, at which time it's fine to run the 
CPU-intensive process. If you prevent the IO intensive task from 
running until the CPU-intensive task has exhausted it's time, it's 
obviously going to take longer before the next IO-request is started, 
and thus longer until it gets completed. It makes little difference 
here if the APPLICATION is asynchronously or synchronously issuing 
the IO-request (assuming that under asynchronous circumstances there 
is a LIMITED amount of AIO queue - else it becomes a CPU-intensive 
task building until it's issued all of the IO-requests and fall asleep).

--
Mats


>Thanks
>Atsushi SAKAI

  reply	other threads:[~2007-07-13 18:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-12 23:21 Credit scheduler pak333
2007-07-13  7:30 ` Atsushi SAKAI
2007-07-13 18:11   ` Mats Petersson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-10-21 18:03 Lasya Venneti
2015-10-22 11:28 ` Dario Faggioli
2011-09-18 15:21 credit scheduler Pratik shinde
2011-09-19 15:53 ` George Dunlap
2011-06-17 14:48 David Xu
2011-06-21 14:04 ` George Dunlap
2009-06-04 17:38 Credit Scheduler gaurav somani
2009-06-23  7:56 ` Michael xin
2007-07-12 20:46 Credit scheduler pak333
     [not found] ` <071220072046.7704.4696931E000C3BAA00001E182207020953CCCCCC 050E9F@comcast.net>
2007-07-12 21:25   ` Mats Petersson
2007-06-27  5:15 pak333
2007-06-27  5:51 ` Atsushi SAKAI
2007-06-27  1:55 pak333
2007-06-27 11:04 ` Keir Fraser
2007-06-27  1:09 pak333
2007-06-27  1:17 ` Keir Fraser
2007-06-26 21:33 pak333
2007-06-27  0:59 ` Keir Fraser
2007-06-27  2:29 ` Atsushi SAKAI
2006-08-28 23:04 credit scheduler Ian Pratt
2006-08-28 22:28 Karl Rister
2006-08-29  6:16 ` Keir Fraser
2006-08-29 12:45   ` George Dunlap 
2006-08-29 21:26 ` Sean Dague
2006-08-29 22:17 ` Emmanuel Ackaouy

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=4697c092.2533440a.3832.3c81@mx.google.com \
    --to=mats@planetcatfish.com \
    --cc=pak333@comcast.net \
    --cc=sakaia@jp.fujitsu.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.