[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] Re: Accounting in Credit Scheduler
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.
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));
CSCHED_MSECS_PER_TICK is #defined as 10, so the accounting code runs
every 10 ms - for each physical processor.
Mike D. Day
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