@@ -151,8 +151,6 @@ struct hfsc_class {
u64 cl_cvtmin; /* minimal virtual time among the
children fit for link-sharing
(monotonic within a period) */
- u64 cl_vtadj; /* intra-period cumulative vt
- adjustment */
u64 cl_cvtoff; /* last (biggest) vt seen between
siblings */
@@ -764,7 +762,6 @@ init_vf(struct hfsc_class *cl, unsigned int len)
/* update the virtual curve */
rtsc_min(&cl->cl_virtual, &cl->cl_fsc, cl->cl_vt, cl->cl_total);
- cl->cl_vtadj = 0;
cl->cl_vtperiod++;
cl->cl_parentperiod = cl->cl_parent->cl_vtperiod;
if (cl->cl_parent->cl_nactive == 0)
@@ -810,17 +807,19 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time)
continue;
/* update vt */
- cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total) + cl->cl_vtadj;
+ cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total);
/*
* fixup vt due to upperlimit (if applicable)
*
- * if vt of the class is smaller than cvtmin,
- * the class was skipped in the past due to non-fit.
- * if so, we need to adjust vtadj.
+ * if we detect we're lagging past virtual times of other siblings,
+ * that means we were skipped in the past due to non-fit.
+ *
+ * If so we adjust vt and shift virtual curve to match current
+ * situation.
*/
if (cl->cl_vt < cl->cl_parent->cl_cvtmin) {
- cl->cl_vtadj += cl->cl_parent->cl_cvtmin - cl->cl_vt;
+ cl->cl_virtual.x += cl->cl_parent->cl_cvtmin - cl->cl_vt;
cl->cl_vt = cl->cl_parent->cl_cvtmin;
}
@@ -1527,7 +1526,6 @@ hfsc_reset_class(struct hfsc_class *cl)
cl->cl_d = 0;
cl->cl_e = 0;
cl->cl_vt = 0;
- cl->cl_vtadj = 0;
cl->cl_cvtmin = 0;
cl->cl_cvtoff = 0;
cl->cl_vtperiod = 0;