Recently, I look in scheduler. So, I think so that Xen 2.0.x has two bugs. One is about showing schedule parameter. Other is Domain initialization. Former locales in ./tools/python/xen/lowlevel/xc/xc.c This bug is that can not transfer parameter into python object in correct. - return Py_BuildValue("{s:i,s:l,s:l,s:l,s:l}", "domain", dom, "mcuadv", mcuadv, "warpback", warpback, "warpvalue", warpvalue, "warpl", warpl, "warpu", warpu); + return Py_BuildValue("{s:i,s:l,s:l,s:l,s:L,s:L}", "domain", dom, "mcuadv", mcuadv, "warpback", warpback, "warpvalue", warpvalue, "warpl", warpl, "warpu", warpu); Latter is included in sched_bvt.c or its besides. I can not find detail location. This bug is that set warpl and warpu parameters into twice when domain is created. If new domain is created, Is its domain created based on temporary domain? In Function bvt_add_task(), these two parameters is set in> inf->warpl = MILLISECS(2000); > inf->warpu = MILLISECS(1000);In Function bvt_adjdom(), these two parameters is set in> inf->warpl = MILLISECS(warpl); > inf->warpu = MILLISECS(warpu);If new domain is created by xm command, these functions are called. Therefore, these parameter is set in like follow. inf->warpl = MILLISECS(MILLISECS(2000)); inf->warpu = MILLISECS(MILLISECS(1000)); However, in the case Domain-0, only bvt_add_task() is called. This is interface design error ? or programming error ? I avoid by removing MILLISECS in bvt_adjdom() in transient. UCHIDA _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel