Commit Graph

11 Commits

Author SHA1 Message Date
ozaki-r f5e9a1cfbc altq, cbq: change long to uint64_t for ILP32 archs
PR kern/56319
2021-07-21 06:47:33 +00:00
ozaki-r 6a54d26911 altq, cbq: treat time in nanoseconds
Time granularity in microseconds is sometimes not enough to provide
accurate bandwidth control; actual bandwidth on a capped class
can exceed its limit considerably in some cases.

Treating time in nanoseconds requires the following changes:
- Use timespec instead of timeval
- Use nanotime(9) instead of microtime(9)
- Change the type of some variables, especially *idle, to long
2021-07-21 06:41:22 +00:00
ozaki-r 46a774a5cf altq, cbq: convert ns_per_byte to ps_per_byte
Also the type of variables of it is changed to u_long from int.

This change provides fine-grain resolution of bandwidth.  For example
750 Mbps was treated as 800 Mbps internally because bandwidth was
represented as nanoseconds per byte.  Converting the representation
to picoseconds per byte enables to treat 750 Mbps as-is.

PR kern/56319
2021-07-21 06:33:30 +00:00
peter dd191f37f3 Merge the peter-altq branch.
(sync with KAME & add support for using ALTQ with pf(4)).
2006-10-12 19:59:07 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
itojun 109461480a expose CBQ_MAXPRI to userland 2003-08-20 23:32:25 +00:00
wiz e00173a7f2 Spell 'should' correctly. 2002-07-18 11:59:06 +00:00
thorpej 5523a584c5 HZ -> hz 2001-06-05 05:12:18 +00:00
thorpej 2dfc514990 Add NetBSD RCS IDs. 2000-12-14 08:49:49 +00:00
thorpej 68de460f39 Import ALTQ from KAME. 2000-12-14 08:42:28 +00:00