Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/altq PR 51553 David Binderman: don't bother counting up ...
details: https://anonhg.NetBSD.org/src/rev/fdd8f31f7713
branches: trunk
changeset: 349040:fdd8f31f7713
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Nov 21 07:15:36 2016 +0000
description:
PR 51553 David Binderman: don't bother counting up backlogged classes
when not doing anything with the results.
diffstat:
sys/altq/altq_jobs.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (67 lines):
diff -r 4aa5ab2db4e9 -r fdd8f31f7713 sys/altq/altq_jobs.c
--- a/sys/altq/altq_jobs.c Mon Nov 21 06:38:18 2016 +0000
+++ b/sys/altq/altq_jobs.c Mon Nov 21 07:15:36 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_jobs.c,v 1.9 2016/04/20 08:58:48 knakahara Exp $ */
+/* $NetBSD: altq_jobs.c,v 1.10 2016/11/21 07:15:36 dholland Exp $ */
/* $KAME: altq_jobs.c,v 1.11 2005/04/13 03:44:25 suz Exp $ */
/*
* Copyright (c) 2001, the Rector and Board of Visitors of the
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_jobs.c,v 1.9 2016/04/20 08:58:48 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_jobs.c,v 1.10 2016/11/21 07:15:36 dholland Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq.h"
@@ -1547,7 +1547,7 @@
update_error(struct jobs_if *jif)
{
int i;
- int active_classes, backlogged_classes;
+ int active_classes;
u_int64_t mean_weighted_delay;
u_int64_t delays[JOBS_MAXPRI];
int64_t* error;
@@ -1562,7 +1562,6 @@
mean_weighted_delay = 0;
active_classes = 0;
- backlogged_classes = 0;
for (i = 0; i <= jif->jif_maxpri; i++) {
cl = jif->jif_classes[i];
@@ -1570,7 +1569,6 @@
is_backlogged = (class_exists && !qempty(cl->cl_q));
if (is_backlogged) {
- backlogged_classes++;
if (cl->concerned_rdc) {
delays[i] = proj_delay(jif, i);
mean_weighted_delay += cl->delay_prod_others*delays[i];
@@ -1685,7 +1683,7 @@
{
int64_t mean;
int64_t* loss_error;
- int i, active_classes, backlogged_classes;
+ int i, active_classes;
int class_exists, is_backlogged;
int class_dropped;
int64_t max_error;
@@ -1704,14 +1702,12 @@
max_error = 0;
mean = 0;
active_classes = 0;
- backlogged_classes = 0;
for (i = 0; i <= jif->jif_maxpri; i++) {
cl = jif->jif_classes[i];
class_exists = (cl != NULL);
is_backlogged = (class_exists && !qempty(cl->cl_q));
if (is_backlogged) {
- backlogged_classes ++;
if (cl->concerned_rlc) {
mean += cl->loss_prod_others
* cl->current_loss;
Home |
Main Index |
Thread Index |
Old Index