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

[Xen-devel] Re: [Xen-users] Credit Scheduler!

To: xen-users@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [Xen-users] Credit Scheduler!
From: "Hardeep Singh" <hardeepguru@xxxxxxxxx>
Date: Fri, 30 Jun 2006 15:29:33 -0500
Delivery-date: Fri, 30 Jun 2006 13:29:57 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=dKZkX/JCJUUtJUexhBzKtcS9mxlUYnK87Y7qR08R+Cg1qlzyxU0tOm5zPvRc4zThyJ6V/Ip4VBiSOWKKs2d7WZfvhtbIfjNOKHOVNQGvDrMlVncBB++Wtv7QSzIyXUNE9E7Wj3VTgeA6p/O2Uqo47zE4G/0sjqI+8xW6KtDQmF4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060630161649.GA23810@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <77d78aa70606300749t4c3b32del9f4e5433be31db3e@xxxxxxxxxxxxxx> <20060630161649.GA23810@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Emmanuel,

I modified my sched_credit.c manually and it looks like this right now..

<snip>

        if ( cmd->u.credit.weight != 0 )
        {
            csched_priv.weight -= sdom->weight;

            if ( !list_empty(&sdom->active_sdom_elem) )
            {
                csched_priv.weight -= sdom->weight;
                csched_priv.weight += cmd->u.credit.weight;
            }

            sdom->weight = cmd->u.credit.weight;
            csched_priv.weight += sdom->weight;
        }

        if ( cmd->u.credit.cap != (uint16_t)~0U )
            sdom->cap = cmd-> u.credit.cap;


</snip>

I futher did a `make clean; make; make install` and tried booting into the unstable version again. I then tried setting the weight of one of the domains to 512 and it worked perfectly. The CPU distribution was also as expected!

However I next tried setting the weight to 20 and got the error shown below! I booted again in xen and tried setting the weight to 256 and it worked however when I set it to 255, xen again crashed!

(XEN) BUG at sched_credit.c:764
(XEN) ----[ Xen-3.0-unstable    Not tainted ]----
(XEN) CPU:    0
(XEN) EIP:    e008:[<ff10fc30>] csched_tick+0x420/0x5a0
(XEN) EFLAGS: 00010096   CONTEXT: hypervisor
(XEN) eax: 00000000   ebx: 00000000   ecx: 0000000a   edx: 00000000
(XEN) esi: ff1d7080   edi: ff192e08   ebp: ff164721   esp: ff19def8
(XEN) cr0: 8005003b   cr3: 0fcf8000
(XEN) ds: e010   es: e010   fs: 0000   gs: 0000   ss: e010   cs: e008
(XEN) Xen stack trace from esp=ff19def8:
(XEN)    ff1641df ff164721 000002fc 00000292 ff16e500 00000020 00000246 ff192e00(XEN)    0000001e 000000ff 00000000 00000000 ff16e500 ff1a5144 000000ff 00000000(XEN)    ff1d7080 ff19dfb4 0000002d ff111f22 00000000 00000003 00000001 ff1a6200(XEN)    ff1a6200 ffbfed80 33a125ef ff114126 00000000 ff1d7080 0000002d ff11e306(XEN)    ff19df7c 00000000 ff1a7780 00000000 00000000 ff1d7080 0000002d ff112f42(XEN)    00f90000 ff11a73e ff19dfb4 ff11a752 00000001 000002f0 ff19dfb4 00000001(XEN)    00000000 00000000 00000001 c039e000 00000000 00000000 000d0000 c01013a7(XEN)    00000061 00000246 c039ffa4 00000069 0000007b 0000007b 00000000 00000000(XEN)    00000000 ff1d7080
(XEN) Xen call trace:
(XEN)    [<ff10fc30>] csched_tick+0x420/0x5a0
(XEN)    [<ff111f22>] t_timer_fn+0x72/0xc0
(XEN)    [<ff114126>] timer_softirq_action+0xc6/0x120
(XEN)    [<ff11e306>] apic_timer_interrupt+0x46/0x50
(XEN)    [<ff112f42>] do_softirq+0x32/0x50
(XEN)    [<ff11a73e>] idle_loop+0x4e/0x80
(XEN)    [<ff11a752>] idle_loop+0x62/0x80
(XEN)
(XEN) ************************************
(XEN) CPU0 FATAL TRAP 6 (invalid opcode), ERROR_CODE 0000, IN INTERRUPT CONTEXT.(XEN) System shutting down -- need manual reset.
(XEN) ************************************


Can you please have a look into it! I guess xen crashes only when weights less than 256 are set to a particular domain!

Thanks & Regards,
Hardeep Singh


On 6/30/06, Emmanuel Ackaouy <ack@xxxxxxxxxxxxx> wrote:
On Fri, Jun 30, 2006 at 09:49:57AM -0500, Hardeep Singh wrote:
>    root@pippin:/home/hardeep# xm sched-credit -d vm1 -w 10
>
>    (XEN) BUG at sched_credit.c:757

Ok I found the problem and submitted a fix to the staging
tree. It should trickle out to the public tree in a couple
hours when it's gone through the regression tests.

In the meantime, here's a patch if you don't want to wait.

diff -r 3dfc2583a4f1 xen/common/sched_credit.c
--- a/xen/common/sched_credit.c Thu Jun 29 16:59:47 2006 +0100
+++ b/xen/common/sched_credit.c Fri Jun 30 16:56:17 2006 +0100
@@ -622,9 +622,12 @@ csched_dom_cntl(

         if ( cmd->u.credit.weight != 0 )
         {
-            csched_priv.weight -= sdom->weight;
+            if ( !list_empty(&sdom->active_sdom_elem) )
+            {
+                csched_priv.weight -= sdom->weight;
+                csched_priv.weight += cmd-> u.credit.weight;
+            }
             sdom->weight = cmd->u.credit.weight;
-            csched_priv.weight += sdom->weight;
         }

         if ( cmd->u.credit.cap != (uint16_t)~0U )



--
hardeep
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>