Re: svn commit: r309745 - in head: share/man/man9 sys/kern sys/sys

2016-12-22 Thread hiren panchasara
On 12/22/16 at 10:33P, Gleb Smirnoff wrote: > Hi! > > On Wed, Dec 21, 2016 at 04:19:28PM -0800, hiren panchasara wrote: > h> On 12/09/16 at 05:58P, Gleb Smirnoff wrote: > h> > Author: glebius > h> > Date: Fri Dec 9 17:58:34 2016 > h> > New Revision: 309745 > h> > URL: https://svnweb.freebsd.org

Re: svn commit: r309745 - in head: share/man/man9 sys/kern sys/sys

2016-12-22 Thread Gleb Smirnoff
Hi! On Wed, Dec 21, 2016 at 04:19:28PM -0800, hiren panchasara wrote: h> On 12/09/16 at 05:58P, Gleb Smirnoff wrote: h> > Author: glebius h> > Date: Fri Dec 9 17:58:34 2016 h> > New Revision: 309745 h> > URL: https://svnweb.freebsd.org/changeset/base/309745 h> > h> > Log: h> > Provide counte

Re: svn commit: r309745 - in head: share/man/man9 sys/kern sys/sys

2016-12-21 Thread hiren panchasara
On 12/09/16 at 05:58P, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Dec 9 17:58:34 2016 > New Revision: 309745 > URL: https://svnweb.freebsd.org/changeset/base/309745 > > Log: > Provide counter_ratecheck(), a MP-friendly substitution to ppsratecheck(). > When rated event happens at a ve

Re: svn commit: r309745 - in head: share/man/man9 sys/kern sys/sys

2016-12-10 Thread Konstantin Belousov
On Fri, Dec 09, 2016 at 10:56:36AM -0800, Gleb Smirnoff wrote: > Yes, this is expected. The interface isn't designed to be precise. So if > we hit limit, the next second result will be 20345 events exceeded the rate > instead of 20346 events. Note that the interface may legitimately give errors in

Re: svn commit: r309745 - in head: share/man/man9 sys/kern sys/sys

2016-12-09 Thread Gleb Smirnoff
Konstantin, On Fri, Dec 09, 2016 at 08:41:17PM +0200, Konstantin Belousov wrote: K> > +int64_t K> > +counter_ratecheck(struct counter_rate *cr, int64_t limit) K> > +{ K> > + int64_t val; K> > + int now; K> > + K> > + val = cr->cr_over; K> > + now = ticks; K> > + K> > + if (now - cr->cr_tick

Re: svn commit: r309745 - in head: share/man/man9 sys/kern sys/sys

2016-12-09 Thread Konstantin Belousov
On Fri, Dec 09, 2016 at 05:58:34PM +, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Dec 9 17:58:34 2016 > New Revision: 309745 > URL: https://svnweb.freebsd.org/changeset/base/309745 > > Log: > Provide counter_ratecheck(), a MP-friendly substitution to ppsratecheck(). > When rated ev