From patchwork Sun Jul 31 23:03:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Soltys X-Patchwork-Id: 654419 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3s2dP95LYzz9sDf for ; Mon, 1 Aug 2016 09:06:05 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579AbcGaXGC (ORCPT ); Sun, 31 Jul 2016 19:06:02 -0400 Received: from drutsystem.com ([84.10.39.251]:36828 "EHLO drutsystem.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751661AbcGaXF5 (ORCPT ); Sun, 31 Jul 2016 19:05:57 -0400 Received: from mott.hasevolq.tld (89-65-85-89.dynamic.chello.pl [89.65.85.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: nozo) by drutsystem.com (Postfix) with ESMTPSA id 4D6FA992B2; Mon, 1 Aug 2016 01:04:01 +0200 (CEST) From: Michal Soltys To: davem@davemloft.net Cc: kaber@trash.net, netdev@vger.kernel.org Subject: [PATCH 2/2] net/sched/sch_hfsc.c: comment out cl_myfadj Date: Mon, 1 Aug 2016 01:03:59 +0200 Message-Id: <1470006239-20299-3-git-send-email-soltys@ziu.info> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1470006239-20299-1-git-send-email-soltys@ziu.info> References: <1470006239-20299-1-git-send-email-soltys@ziu.info> X-MailScanner-ID: 4D6FA992B2.AA41D X-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-MailScanner-From: soltys@ziu.info X-Spam-Status: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The part of the code using it is commented out, so the needless use of this variable can be commented out as well. Signed-off-by: Michal Soltys --- net/sched/sch_hfsc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 6329d7d..99ddc38 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -142,8 +142,11 @@ struct hfsc_class { link-sharing, max(myf, cfmin) */ u64 cl_myf; /* my fit-time (calculated from this class's own upperlimit curve) */ +#if 0 +/* code using cl_myfadj is disabled */ u64 cl_myfadj; /* my fit-time adjustment (to cancel history dependence) */ +#endif u64 cl_cfmin; /* earliest children's fit-time (used with cl_myf to obtain cl_f) */ u64 cl_cvtmin; /* minimal virtual time among the @@ -730,7 +733,10 @@ init_vf(struct hfsc_class *cl, unsigned int len) /* compute myf */ cl->cl_myf = rtsc_y2x(&cl->cl_ulimit, cl->cl_total); +#if 0 +/* code using cl_myfadj is disabled */ cl->cl_myfadj = 0; +#endif } } @@ -797,9 +803,10 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time) /* update f */ if (cl->cl_flags & HFSC_USC) { + cl->cl_myf = rtsc_y2x(&cl->cl_ulimit, cl->cl_total); +#if 0 cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit, cl->cl_total); -#if 0 /* * This code causes classes to stay way under their * limit when multiple classes are used at gigabit @@ -1471,7 +1478,10 @@ hfsc_reset_class(struct hfsc_class *cl) cl->cl_parentperiod = 0; cl->cl_f = 0; cl->cl_myf = 0; +#if 0 +/* code using cl_myfadj is disabled */ cl->cl_myfadj = 0; +#endif cl->cl_cfmin = 0; cl->cl_nactive = 0;