[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: bvt scheduler has two bugs?
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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |