WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: Accounting in Credit Scheduler

To: rahul gundecha <rahoolgundecha@xxxxxxxxxxx>
Subject: [Xen-devel] Re: Accounting in Credit Scheduler
From: "Mike D. Day" <ncmike@xxxxxxxxxx>
Date: Mon, 9 Apr 2007 11:35:58 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 09 Apr 2007 08:35:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <223409.11334.qm@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <20070409142902.GA2336@xxxxxxxxxxxxxxxxxxxxxx> <223409.11334.qm@xxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: ncmike@xxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
On 09/04/07 15:40 +0100, rahul gundecha wrote:

  thanks alot Mike for kind reply.
  One more curiousity is how often a timer routine is called & how often
  scheduling code?  It may be configurable interval as well, but then
  whats default value.
  I guess timer is called more frequently & call to scheduling routine
  is made less frquently and is called from timer itself.
  Can I get pointer to some reference where I will get to know how
  exactly this mechanism works. May be digging through code will be
  expensive option so I want to avoid it for a moment.
  thanks,
  -rahul


The timer is initialized in xen/common/sched_credit.c:
static __init int csched_start_tickers(void)
{
   struct csched_pcpu *spc;
   unsigned int cpu;

   for_each_online_cpu ( cpu )
   {
       spc = CSCHED_PCPU(cpu);
       set_timer(&spc->ticker, NOW() + MILLISECS(CSCHED_MSECS_PER_TICK));
   }

   return 0;
}


CSCHED_MSECS_PER_TICK is #defined as 10, so the accounting code runs
every 10 ms - for each physical processor.

Mike

--
Mike D. Day
IBM LTC
Cell: 919 412-3900
Sametime: ncmike@xxxxxxxxxx AIM: ncmikeday  Yahoo: ultra.runner
PGP key: http://www.ncultra.org/ncmike/pubkey.asc

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