/* get the leaf class with the minimum vt in the hierarchy  */
static struct hfsc_class* vttree_get_minvt(struct hfsc_class *cl, u64 cur_time)
/* get the leaf class with the minimum vt in the hierarchy  */
static struct hfsc_class* vttree_get_minvt(struct hfsc_class *cl, u64 cur_time)
{
	if (cl->cl_cfmin > cur_time)
		return NULL;
	while (cl->level > 0) {
		cl = vttree_firstfit(cl, cur_time);
		if (cl == NULL)
			return NULL;
		if (cl->cl_parent->cl_cvtmin < cl->cl_vt)
			cl->cl_parent->cl_cvtmin = cl->cl_vt;
	}
	return cl;
}