3 msgATH rate and rssi considerations
6 msgifconfig ath0 list mac - no list
1 msgCFT: nge(4)
9 msglatest rc.subr breaks etc/rc.d/sendmail
5 msgpanic upon starting X in recent -CURRENTs (inte...
17 msgFreeBSD 7.0 on DVD
24 msgDTrace/FreeBSD source snapshot

sys/kern/kern_time.c / ppsratecheck() off by one?
\ Peter Wood (31 Jan 2008)

24 msgneeds a tester with an SMP 7.0 box
2 msgIPSEC on FreeBSD 7.0
2 msgRe: ZVOL/ZFS hosting UFS filesystems ... ERROR!
1 msg[patch] unable to remount/update gjournaled fs ...
1 msgReproducible ZFS-related panic
1 msggeneral protection fault in in_ifadown
1 msgInteresting segfault
1 msgdevel/valkyrie port for newer valgrind
5 msgUSB support + Supermicro IPMI KVM = no keyboard
1 msgfwd: [linimon: results of the 20080125 bugathon]
5 msgTurning COMPAT_43TTY into a binary-only compati...
8 msgpanic: Lock so_rcv_sx not exclusively locked
Subject:sys/kern/kern_time.c / ppsratecheck() off by one?
Group:Freebsd-current
From:Peter Wood
Date:31 Jan 2008


 
Hey,

I'm currently doing some work on implementing sampling in BPF, for one
of the methods I've decided to make use of ppsratecheck(). After doing
some testing, I found an unexpected result.

Having run ppsratecheck() through on paper, I believe that it'll always
be off by one if the actual pps is equal or above the maximum you require.

8.0-CURRENT integrated last night, in sys/kern/kern_time.c in
ppsratecheck() the last return of the function is follows:

853 return (maxpps < 0 || *curpps < maxpps);

Should this not be

853 return (maxpps < 0 || *curpps <= maxpps);

As without it ppsratecheck() will never permit maxpps, only maxpps - 1.

I could be talking twoddle, but I wanted to check.

Pete.

_______________________________________________
freebsd-current mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe"


© 2004-2008 readlist.com