Thread (15 messages) 15 messages, 2 authors, 2011-11-06

[PATCH 05/11] sch_hfsc.c: don't subtract from cl_vtoff and cl_cvtoff

flat view
STALE5463d

From: Michal Soltys <hidden>
Date: 2011-11-05 02:33:09
Subsystem: networking [general], tc subsystem, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jamal Hadi Salim, Jiri Pirko, Linus Torvalds

Using pcvtoff to keep vtoff as close to 0 as possible is not necessary. All
curves (based on real or virtual time) use the same mechanics, and real time
based ones are obviously not even allowed anything like that.

This might be some leftover from earlier hfsc versions (or perhaps versions
[that are/were ?] limited to 32 bit values only, where such thing would help a
bit against hitting overflow ... though what about RSC/USC ?).

Signed-off-by: Michal Soltys <redacted>
---
 net/sched/sch_hfsc.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 97d720c..e0cf11b 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -155,8 +155,6 @@ struct hfsc_class {
 	u64	cl_vtoff;		/* inter-period cumulative vt offset */
 	u64	cl_cvtmax;		/* max child's vt in the last period */
 	u64	cl_cvtoff;		/* cumulative cvtmax of all periods */
-	u64	cl_pcvtoff;		/* parent's cvtoff at initialization
-					   time */
 
 	struct internal_sc cl_rsc;	/* internal real-time service curve */
 	struct internal_sc cl_fsc;	/* internal fair service curve */
@@ -719,17 +717,12 @@ init_vf(struct hfsc_class *cl, unsigned int len)
 				cl->cl_vt = 0;
 			}
 
-			cl->cl_vtoff = cl->cl_parent->cl_cvtoff -
-							cl->cl_pcvtoff;
+			cl->cl_vtoff = cl->cl_parent->cl_cvtoff;
 
 			/* update the virtual curve */
 			vt = cl->cl_vt + cl->cl_vtoff;
 			rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt,
 						      cl->cl_total);
-			if (cl->cl_virtual.x == vt) {
-				cl->cl_virtual.x -= cl->cl_vtoff;
-				cl->cl_vtoff = 0;
-			}
 			cl->cl_vtadj = 0;
 
 			cl->cl_vtperiod++;  /* increment vt period */
@@ -1102,7 +1095,6 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
 	if (parent->level == 0)
 		hfsc_purge_queue(sch, parent);
 	hfsc_adjust_levels(parent);
-	cl->cl_pcvtoff = parent->cl_cvtoff;
 	sch_tree_unlock(sch);
 
 	qdisc_class_hash_grow(sch, &q->clhash);
@@ -1500,7 +1492,6 @@ hfsc_reset_class(struct hfsc_class *cl)
 	cl->cl_cvtmin       = 0;
 	cl->cl_cvtmax       = 0;
 	cl->cl_cvtoff       = 0;
-	cl->cl_pcvtoff      = 0;
 	cl->cl_vtperiod     = 0;
 	cl->cl_parentperiod = 0;
 	cl->cl_f            = 0;
-- 
1.7.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help