All of lore.kernel.org
 help / color / mirror / Atom feed
* Accounting in Credit Scheduler
@ 2007-04-09 11:03 rahul gundecha
  2007-04-09 14:29 ` Mike D. Day
  0 siblings, 1 reply; 10+ messages in thread
From: rahul gundecha @ 2007-04-09 11:03 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 579 bytes --]

Hi..

I was going through wiki page of Credit Scheduler which says -
" The scheduling decision is the common path of the scheduler and is therefore designed to be light weight and efficient. No accounting takes place in this code path. "  

So  where does the accounting process takes place. exctaly by which way accounting for CPU, different IO device usage is done. With the complex architecture of Xen, how does this accounting process is carried out?

thanks,
-Rahul

 				
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 

[-- Attachment #1.2: Type: text/html, Size: 772 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Accounting in Credit Scheduler
  2007-04-09 11:03 Accounting in Credit Scheduler rahul gundecha
@ 2007-04-09 14:29 ` Mike D. Day
  2007-04-09 14:40   ` rahul gundecha
  0 siblings, 1 reply; 10+ messages in thread
From: Mike D. Day @ 2007-04-09 14:29 UTC (permalink / raw)
  To: rahul gundecha; +Cc: xen-devel

On 09/04/07 12:03 +0100, rahul gundecha wrote:
>
>   Hi..
>   I was going through wiki page of Credit Scheduler which says -
>   " The scheduling decision is the common path of the scheduler and is
>   therefore designed to be light weight and efficient. No accounting
>   takes place in this code path. "
>   So  where does the accounting process takes place. exctaly by which
>   way accounting for CPU, different IO device usage is done. With the
>   complex architecture of Xen, how does this accounting process is
>   carried out?

The credit scheduler sets up a timer when it is initialized. It does
process accounting during the timer service routine.

The decision to schedule the next vcpu is done on a different code
path, and is optimized to be as fast as possible.

Mike

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Accounting in Credit Scheduler
  2007-04-09 14:29 ` Mike D. Day
@ 2007-04-09 14:40   ` rahul gundecha
  2007-04-09 15:35     ` Mike D. Day
  2007-04-09 21:04     ` Re: Accounting in Credit Scheduler Diwaker Gupta
  0 siblings, 2 replies; 10+ messages in thread
From: rahul gundecha @ 2007-04-09 14:40 UTC (permalink / raw)
  To: ncmike; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1691 bytes --]

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

"Mike D. Day" <ncmike@us.ibm.com> wrote: On 09/04/07 12:03 +0100, rahul gundecha wrote:
>
>   Hi..
>   I was going through wiki page of Credit Scheduler which says -
>   " The scheduling decision is the common path of the scheduler and is
>   therefore designed to be light weight and efficient. No accounting
>   takes place in this code path. "
>   So  where does the accounting process takes place. exctaly by which
>   way accounting for CPU, different IO device usage is done. With the
>   complex architecture of Xen, how does this accounting process is
>   carried out?

The credit scheduler sets up a timer when it is initialized. It does
process accounting during the timer service routine.

The decision to schedule the next vcpu is done on a different code
path, and is optimized to be as fast as possible.

Mike

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




-Rahooooooooooooooool...
 exceptions are most common things to happen..... 

 				
---------------------------------
 Here’s a new way to find what you're looking for - Yahoo! Answers 

[-- Attachment #1.2: Type: text/html, Size: 2929 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Accounting in Credit Scheduler
  2007-04-09 14:40   ` rahul gundecha
@ 2007-04-09 15:35     ` Mike D. Day
  2007-04-11 19:04       ` XenOProfile may have the conflict with SATA AHCI mode Liang Yang
  2007-04-09 21:04     ` Re: Accounting in Credit Scheduler Diwaker Gupta
  1 sibling, 1 reply; 10+ messages in thread
From: Mike D. Day @ 2007-04-09 15:35 UTC (permalink / raw)
  To: rahul gundecha; +Cc: xen-devel

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@us.ibm.com AIM: ncmikeday  Yahoo: ultra.runner
PGP key: http://www.ncultra.org/ncmike/pubkey.asc

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: Accounting in Credit Scheduler
  2007-04-09 14:40   ` rahul gundecha
  2007-04-09 15:35     ` Mike D. Day
@ 2007-04-09 21:04     ` Diwaker Gupta
  2007-04-10 12:43       ` rahul gundecha
  1 sibling, 1 reply; 10+ messages in thread
From: Diwaker Gupta @ 2007-04-09 21:04 UTC (permalink / raw)
  To: rahul gundecha; +Cc: ncmike, xen-devel

> 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.

Your best bet is to study the code. The scheduler code is fairly
readable. IIRC, the accounting code happens in two parts -- every
10ms, measurements are made, but only every 30ms the measurements are
used to update accounting information. Read xen/common/sched_credit.c

Diwaker
-- 
Web/Blog/Gallery: http://floatingsun.net/blog

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: Accounting in Credit Scheduler
  2007-04-09 21:04     ` Re: Accounting in Credit Scheduler Diwaker Gupta
@ 2007-04-10 12:43       ` rahul gundecha
  0 siblings, 0 replies; 10+ messages in thread
From: rahul gundecha @ 2007-04-10 12:43 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1156 bytes --]

thanks alot Diwaker & Mike from your kind replies.. I will go through sched_credit.c as well..

regards,
-Rahul

Diwaker Gupta <diwaker.lists@gmail.com> wrote: > 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.

Your best bet is to study the code. The scheduler code is fairly
readable. IIRC, the accounting code happens in two parts -- every
10ms, measurements are made, but only every 30ms the measurements are
used to update accounting information. Read xen/common/sched_credit.c

Diwaker
-- 
Web/Blog/Gallery: http://floatingsun.net/blog




-Rahooooooooooooooool...
 exceptions are most common things to happen..... 

       
---------------------------------
 Check out what you're missing if you're not on Yahoo! Messenger 

[-- Attachment #1.2: Type: text/html, Size: 2324 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* XenOProfile may have the conflict with SATA AHCI mode.
  2007-04-09 15:35     ` Mike D. Day
@ 2007-04-11 19:04       ` Liang Yang
  2007-04-11 19:17         ` Ian Pratt
  0 siblings, 1 reply; 10+ messages in thread
From: Liang Yang @ 2007-04-11 19:04 UTC (permalink / raw)
  To: xen-devel

Hi,

I notice this issue recently when I'm using XenOProfile with the latest 
Xen-unstable repository. I have several SATA disks to hose several guest 
domains. For the performance purpose, I want to use the on-board AHCI mode 
so each SATA disk has its own data transfer channel. However, I found 
XenOProfile has some conflict with AHCI mode as Xen will boot into kernel 
panic with weird mount errors after XenOProfile is enabled. The problem is 
gone when I set SATA mode to compatible  in BIOS (i.g. IDE emulation mode).

Regards,

Liang

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: XenOProfile may have the conflict with SATA AHCI mode.
  2007-04-11 19:04       ` XenOProfile may have the conflict with SATA AHCI mode Liang Yang
@ 2007-04-11 19:17         ` Ian Pratt
  2007-04-11 21:36           ` Santos, Jose Renato G
  2007-04-12 22:23           ` Liang Yang
  0 siblings, 2 replies; 10+ messages in thread
From: Ian Pratt @ 2007-04-11 19:17 UTC (permalink / raw)
  To: Liang Yang, xen-devel

> I notice this issue recently when I'm using XenOProfile with the
latest
> Xen-unstable repository. I have several SATA disks to hose several
guest
> domains. For the performance purpose, I want to use the on-board AHCI
> mode
> so each SATA disk has its own data transfer channel. However, I found
> XenOProfile has some conflict with AHCI mode as Xen will boot into
> kernel
> panic with weird mount errors after XenOProfile is enabled. The
problem
> is
> gone when I set SATA mode to compatible  in BIOS (i.g. IDE emulation
> mode).

XenOProfile is the only thing that uses NMIs, but I've no idea why that
would interfere with the SATA controller.

If you were seing the issue round the other way I'd suspect something
dodgy with the BIOS'es SMM mode. Might still be worth checking for a
BIOS upgrade.

Ian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: XenOProfile may have the conflict with SATA AHCI mode.
  2007-04-11 19:17         ` Ian Pratt
@ 2007-04-11 21:36           ` Santos, Jose Renato G
  2007-04-12 22:23           ` Liang Yang
  1 sibling, 0 replies; 10+ messages in thread
From: Santos, Jose Renato G @ 2007-04-11 21:36 UTC (permalink / raw)
  To: Ian Pratt, Liang Yang, xen-devel

 

> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com 
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Ian Pratt
> Sent: Wednesday, April 11, 2007 12:18 PM
> To: Liang Yang; xen-devel@lists.xensource.com
> Subject: RE: [Xen-devel] XenOProfile may have the conflict 
> with SATA AHCI mode.
> 
> > I notice this issue recently when I'm using XenOProfile with the
> latest
> > Xen-unstable repository. I have several SATA disks to hose several
> guest
> > domains. For the performance purpose, I want to use the 
> on-board AHCI 
> > mode so each SATA disk has its own data transfer channel. 
> However, I 
> > found XenOProfile has some conflict with AHCI mode as Xen will boot 
> > into kernel panic with weird mount errors after XenOProfile is 
> > enabled. The
> problem
> > is
> > gone when I set SATA mode to compatible  in BIOS (i.g. IDE 
> emulation 
> > mode).
> 
> XenOProfile is the only thing that uses NMIs, but I've no 
> idea why that would interfere with the SATA controller.
> 

  I don't know how XenOprofile could be interfering with SATA 
controller either. The only possible explanation I can think
of is that the NMI interrupts are disrupting some time sensitive
code in the SATA driver, but I do not know much about SATA.
Maybe someone more familiar with SATA can comment.

Do you see the same behavior runing Oprofile in vanila linux?
What is the parameters you use to start oprofile?

Renato.

> If you were seing the issue round the other way I'd suspect 
> something dodgy with the BIOS'es SMM mode. Might still be 
> worth checking for a BIOS upgrade.
> 
> Ian
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: XenOProfile may have the conflict with SATA AHCI mode.
  2007-04-11 19:17         ` Ian Pratt
  2007-04-11 21:36           ` Santos, Jose Renato G
@ 2007-04-12 22:23           ` Liang Yang
  1 sibling, 0 replies; 10+ messages in thread
From: Liang Yang @ 2007-04-12 22:23 UTC (permalink / raw)
  To: Ian Pratt, xen-devel

I once thought maybe the problem is caused by the failure of loading AHCI 
driver. So I added --preload=AHCI when building ramdisk for Xen after 
XenOProfiling is enabled.
However, Xen still booted into kernel panic with weird mount errors.

I used some patch for XenOProfile nmi_int.c to make it work on Intel core 2 
based processors. I notice Xen also updated nmi_int.c a couple of days ago 
to make XenOProfile
recognize Intel core 2 based processors. I hope the problem is not caused by 
the updates of nmi_int.c.

BTW, The BIOS is already flashed to the latest I could get.

Liang

----- Original Message ----- 
From: "Ian Pratt" <Ian.Pratt@cl.cam.ac.uk>
To: "Liang Yang" <multisyncfe991@hotmail.com>; 
<xen-devel@lists.xensource.com>
Sent: Wednesday, April 11, 2007 12:17 PM
Subject: RE: [Xen-devel] XenOProfile may have the conflict with SATA AHCI 
mode.


> I notice this issue recently when I'm using XenOProfile with the
latest
> Xen-unstable repository. I have several SATA disks to hose several
guest
> domains. For the performance purpose, I want to use the on-board AHCI
> mode
> so each SATA disk has its own data transfer channel. However, I found
> XenOProfile has some conflict with AHCI mode as Xen will boot into
> kernel
> panic with weird mount errors after XenOProfile is enabled. The
problem
> is
> gone when I set SATA mode to compatible  in BIOS (i.g. IDE emulation
> mode).

XenOProfile is the only thing that uses NMIs, but I've no idea why that
would interfere with the SATA controller.

If you were seing the issue round the other way I'd suspect something
dodgy with the BIOS'es SMM mode. Might still be worth checking for a
BIOS upgrade.

Ian

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-04-12 22:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-09 11:03 Accounting in Credit Scheduler rahul gundecha
2007-04-09 14:29 ` Mike D. Day
2007-04-09 14:40   ` rahul gundecha
2007-04-09 15:35     ` Mike D. Day
2007-04-11 19:04       ` XenOProfile may have the conflict with SATA AHCI mode Liang Yang
2007-04-11 19:17         ` Ian Pratt
2007-04-11 21:36           ` Santos, Jose Renato G
2007-04-12 22:23           ` Liang Yang
2007-04-09 21:04     ` Re: Accounting in Credit Scheduler Diwaker Gupta
2007-04-10 12:43       ` rahul gundecha

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.