DragonFly commits List (threaded) for 2004-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/sys/kern kern_clock.c kern_event.c kern_sig.c kern_synch.c kern_threads.c kern_time.c sys_generic.c vfs_aio.c src/sys/net bpf.c src/sys/sys signalvar.h time.h src/sys/vfs/smbfs smbfs_smb.c src/sys/netinet in_rmx.c src/sys/netproto/ncp ...
dillon 2004/01/07 03:04:27 PST
DragonFly src repository
Modified files:
sys/kern kern_clock.c kern_event.c kern_sig.c
kern_synch.c kern_threads.c kern_time.c
sys_generic.c vfs_aio.c
sys/net bpf.c
sys/sys signalvar.h time.h
sys/vfs/smbfs smbfs_smb.c
sys/netinet in_rmx.c
sys/netproto/ncp ncp_sock.c
sys/netproto/smb smb_trantcp.c
Log:
tvtohz() was originally designed for tsleep() and timeout() operations but
it is also used to time nanosleep() ops. The problem is that in order to
compensate for the fact that a clock interrupt might occur just after a
thread blocks or registers a timeout, this function effectively added +1
to the returned value plus added another +1 for timeouts that were not
integer multiples if the clock interrupt frequency.
Split tvtohz() into two routines: tvtohz_low() and tvtohz_high().
tvtohz_low() does not do any compensation, tvtohz_high() does.
Add the kern.sleep_hardloop sysctl, which defaults to 0 (off). If set to
1 this will cause nanosleep() to attempt to time exactly the requested
interval (which could cost more cpu) rather then rounding it off to a
multiple of hz. If set to 2 nanosleep() will only do the more rigid
timing for requests less then 1 second. Also change the normal hz-baesd
case to only compensate by +1, not +2, in order to improve accuracy.
Revision Changes Path
1.13 +49 -33 src/sys/kern/kern_clock.c
1.10 +4 -4 src/sys/kern/kern_event.c
1.24 +19 -0 src/sys/kern/kern_sig.c
1.26 +1 -0 src/sys/kern/kern_synch.c
1.8 +1 -1 src/sys/kern/kern_threads.c
1.12 +36 -9 src/sys/kern/kern_time.c
1.16 +2 -2 src/sys/kern/sys_generic.c
1.12 +2 -2 src/sys/kern/vfs_aio.c
1.10 +1 -1 src/sys/net/bpf.c
1.11 +1 -0 src/sys/sys/signalvar.h
1.7 +2 -1 src/sys/sys/time.h
1.6 +1 -1 src/sys/vfs/smbfs/smbfs_smb.c
1.4 +1 -1 src/sys/netinet/in_rmx.c
1.8 +1 -1 src/sys/netproto/ncp/ncp_sock.c
1.7 +1 -1 src/sys/netproto/smb/smb_trantcp.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_clock.c.diff?r1=1.12&r2=1.13&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_event.c.diff?r1=1.9&r2=1.10&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_sig.c.diff?r1=1.23&r2=1.24&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_synch.c.diff?r1=1.25&r2=1.26&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_threads.c.diff?r1=1.7&r2=1.8&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_time.c.diff?r1=1.11&r2=1.12&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/sys_generic.c.diff?r1=1.15&r2=1.16&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_aio.c.diff?r1=1.11&r2=1.12&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/net/bpf.c.diff?r1=1.9&r2=1.10&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/signalvar.h.diff?r1=1.10&r2=1.11&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/sys/time.h.diff?r1=1.6&r2=1.7&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/vfs/smbfs/smbfs_smb.c.diff?r1=1.5&r2=1.6&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/netinet/in_rmx.c.diff?r1=1.3&r2=1.4&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/netproto/ncp/ncp_sock.c.diff?r1=1.7&r2=1.8&f=h
http://www.dragonflybsd.org/cvsweb/src/sys/netproto/smb/smb_trantcp.c.diff?r1=1.6&r2=1.7&f=h
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]