Lines Matching refs:diff

532 htb_class_mode(struct htb_class *cl, s64 *diff)  in htb_class_mode()  argument
536 if ((toks = (cl->ctokens + *diff)) < htb_lowater(cl)) { in htb_class_mode()
537 *diff = -toks; in htb_class_mode()
541 if ((toks = (cl->tokens + *diff)) >= htb_hiwater(cl)) in htb_class_mode()
544 *diff = -toks; in htb_class_mode()
561 htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, s64 *diff) in htb_change_class_mode() argument
563 enum htb_cmode new_mode = htb_class_mode(cl, diff); in htb_change_class_mode()
657 static inline void htb_accnt_tokens(struct htb_class *cl, int bytes, s64 diff) in htb_accnt_tokens() argument
659 s64 toks = diff + cl->tokens; in htb_accnt_tokens()
670 static inline void htb_accnt_ctokens(struct htb_class *cl, int bytes, s64 diff) in htb_accnt_ctokens() argument
672 s64 toks = diff + cl->ctokens; in htb_accnt_ctokens()
703 s64 diff; in htb_charge_class() local
706 diff = min_t(s64, q->now - cl->t_c, cl->mbuffer); in htb_charge_class()
710 htb_accnt_tokens(cl, bytes, diff); in htb_charge_class()
713 cl->tokens += diff; /* we moved t_c; update tokens */ in htb_charge_class()
715 htb_accnt_ctokens(cl, bytes, diff); in htb_charge_class()
719 diff = 0; in htb_charge_class()
720 htb_change_class_mode(q, cl, &diff); in htb_charge_class()
725 htb_add_to_wait_tree(q, cl, diff); in htb_charge_class()
758 s64 diff; in htb_do_events() local
769 diff = min_t(s64, q->now - cl->t_c, cl->mbuffer); in htb_do_events()
770 htb_change_class_mode(q, cl, &diff); in htb_do_events()
772 htb_add_to_wait_tree(q, cl, diff); in htb_do_events()