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: bvt scheduler has two bugs?

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: bvt scheduler has two bugs?
From: "Satoshi Uchida" <s-uchida@xxxxxxxxxxxxx>
Date: Fri, 2 Sep 2005 16:08:44 +0900
Delivery-date: Fri, 02 Sep 2005 07:06:48 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWvjSdEKcnyDMsWR4yEbQVf6dc7Vg==
Hi.

In BVT scheduler setup, location of bug is determined.
If new guest domain is created by xm create command,
warpl and warpu parameters multiples MILLISECS * MULLISECS.

In  tools/libxc/xc_domain.c,

    op.cmd = DOM0_CREATEDOMAIN;
    op.u.createdomain.domain = (domid_t)*pdomid;
    op.u.createdomain.memory_kb = mem_kb;
    op.u.createdomain.cpu = cpu;

    if ( (err = do_dom0_op(xc_handle, &op)) == 0 )   <<< (1)
    {
        *pdomid = (u16)op.u.createdomain.domain;

         err = xc_domain_setcpuweight(xc_handle, *pdomid, cpu_weight); <<< 
(2)
    }

This algorithm is default value * MILLISECS at add_task function
in xen/common/sched_bvt.c via do_dom0_op function (1).
If a creation of new domain is success, it's parameters are setting
adjdom function in xen/common/sched_bvt.c via xc_domain_setcpuweight
function (2).
So that, below two parameter become default values *  MILLISECS * 
MILLISECS.

However, In xm bvt command, only adjdom function is called at once.
Therefore, BVT parameter setting is different to your intention.

I can not judge that error is in xm create command or in xm bvt command.
If former is, you needs to modified as follow.

  Insert "#include <xen/time.h>"  in  tools/libxc/xc_domain.c, and
  in tools/libxc/xc_domain.c - xc_domain_setcpuweight : line 200


        case SCHED_BVT:
        {
            u32 mcuadv;
            int warpback;
            s32 warpvalue;
            long long warpl;
            long long warpu;

            /* Preserve all the scheduling parameters apart
               of MCU advance. */
            if((ret = xc_bvtsched_domain_get(xc_handle, domid, &mcuadv,
                                &warpback, &warpvalue, &warpl, &warpu)))
                return ret;

            /* The MCU advance is inverse of the weight.
               Default value of the weight is 1, default mcuadv 10.
               The scaling factor is therefore 10. */
            if(weight > 0) mcuadv = 10 / weight;

       +   warpl /= MILLISECS(1)
       +   warpu /= MILLISECS(1)

            ret = xc_bvtsched_domain_set(xc_handle, domid, mcuadv,
                                         warpback, warpvalue, warpl, 
warpu);
            break;
        }


If latter,

  in xen/common/sched_bvt.c - bvt_adjdom function : line 318

        inf->warpl = MILLISECS(warpl);     >>   inf->warpl = warpl;
        inf->warpu = MILLISECS(warpu);   >>   inf->warpu = warpu;




Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Re: bvt scheduler has two bugs?, Satoshi Uchida <=