| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calling getmicrouptime (but maintain the struct timeval-based calling
convention for compatibility)
o eliminate the use of timersub in ratecheck
Note that flood ping tests indicate ppsratecheck is inaccurate (but on the
conservative side) with this revised implementation. If more accuracy is
needed we'll have to introduce an alternate interface or increase the
overhead.
Reviewed by: silby, dillon, bde
Notes:
svn path=/head/; revision=108511
|
| |
|
|
|
|
|
|
|
| |
ppsratecheck is for controlling packets/second
Obtained from: netbsd
Notes:
svn path=/head/; revision=108142
|
| |
|
|
| |
Notes:
svn path=/head/; revision=107849
|
| |
|
|
| |
Notes:
svn path=/head/; revision=107839
|
| |
|
|
|
|
|
| |
Reviewed by: md5
Notes:
svn path=/head/; revision=107838
|
| |
|
|
|
|
|
|
|
|
| |
augment the system policy for changing the system time.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Notes:
svn path=/head/; revision=106369
|
| |
|
|
|
|
|
|
|
|
| |
0 is never returned.
PR: 41781
MFC after: 3 days
Notes:
svn path=/head/; revision=103964
|
| |
|
|
| |
Notes:
svn path=/head/; revision=102074
|
| |
|
|
| |
Notes:
svn path=/head/; revision=99012
|
| |
|
|
|
|
|
| |
really need to know the gory details.
Notes:
svn path=/head/; revision=95529
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the change as a continuous slew rather than as a series of
discrete steps and make it possible to adjust arbitraryly huge
amounts of time in either direction.
In practice this is done by hooking into the same once-per-second
loop as the NTP PLL and setting a suitable frequency offset deducting
the amount slewed from the remainder. If the remaining delta is
larger than 1 second we slew at 5000PPM (5msec/sec), for a delta
less than a second we slew at 500PPM (500usec/sec) and for the last
one second period we will slew at whatever rate (less than 500PPM)
it takes to eliminate the delta entirely.
The old implementation stepped the clock a number of microseconds
every HZ to acheive the same effect, using the same rates of change.
Eliminate the global variables tickadj, tickdelta and timedelta and
their various use and initializations.
This removes the most significant obstacle to running timecounter and
NTP housekeeping from a timeout rather than hardclock.
Notes:
svn path=/head/; revision=94754
|
| |
|
|
|
|
|
|
|
|
|
|
| |
so it can use td_ucred.
- Push Giant down into the end of settime() where we actually set the time
on the timecounter and time of day clock.
- Remove Giant from clock_settime().
- Push Giant down in settimeofday() to just protect the 'tz' global
variable.
Notes:
svn path=/head/; revision=94343
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
general cleanup of the API. The entire API now consists of two functions
similar to the pre-KSE API. The suser() function takes a thread pointer
as its only argument. The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0. The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.
Discussed on: smp@
Notes:
svn path=/head/; revision=93593
|
| |
|
|
| |
Notes:
svn path=/head/; revision=92723
|
| |
|
|
| |
Notes:
svn path=/head/; revision=90836
|
| |
|
|
|
|
|
|
|
|
| |
a time change, and callers so that they provide td->td_proc.
o Modify settime() to use securevel_gt() for securelevel checking.
Obtained from: TrustedBSD Project
Notes:
svn path=/head/; revision=83969
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Notes:
svn path=/head/; revision=83366
|
| |
|
|
|
|
|
|
|
|
|
| |
clock_gettime() clock_settime() nanosleep() settimeofday()
adjtime() getitimer() setitimer() __sysctl() ogetkerninfo()
sigaction() osigaction() sigpending() osigpending() osigvec()
osigblock() osigsetmask() sigsuspend() osigsuspend() osigstack()
sigaltstack() kill() okillpg() trapsignal() nosys()
Notes:
svn path=/head/; revision=82746
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
other "system" header files.
Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.
Sort sys/*.h includes where possible in affected files.
OK'ed by: bde (with reservations)
Notes:
svn path=/head/; revision=76166
|
| |
|
|
| |
Notes:
svn path=/head/; revision=73916
|
| |
|
|
|
|
|
|
|
| |
allocated, 2 have been added to struct proc for setitimer and sleep.
Reviewed by: jhb, jlemon
Notes:
svn path=/head/; revision=69286
|
| |
|
|
|
|
|
|
| |
Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks
by 924 bytes.
Notes:
svn path=/head/; revision=59368
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the public interface more systematically named.
Remove the alternate method, it doesn't do any good, only ruins performance.
Add counters to profile the usage of the 8 access functions.
Apply the beer-ware to my code.
The weird +/- counts are caused by two repocopies behind the scenes:
kern/kern_clock.c -> kern/kern_tc.c
sys/time.h -> sys/timetc.h
(thanks peter!)
Notes:
svn path=/head/; revision=58377
|
| |
|
|
|
|
|
|
|
|
|
|
| |
"rw" argument, rather than hijacking B_{READ|WRITE}.
Fix two bugs (physio & cam) resulting by the confusion caused by this.
Submitted by: Tor.Egge@fast.no
Reviewed by: alc, ken (partly)
Notes:
svn path=/head/; revision=52644
|
| |
|
|
| |
Notes:
svn path=/head/; revision=50477
|
| |
|
|
|
|
|
| |
splbio()/splx()) are #included in time.
Notes:
svn path=/head/; revision=48274
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1:
s/suser/suser_xxx/
2:
Add new function: suser(struct proc *), prototyped in <sys/proc.h>.
3:
s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/
The remaining suser_xxx() calls will be scrutinized and dealt with
later.
There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.
More changes to the suser() API will come along with the "jail" code.
Notes:
svn path=/head/; revision=46112
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
for as much as one second, but no more. Allows a miscreant to
double-time march the clock, but no worse.
XXX Unlike putting negative deltas in a while(1), performing small
positive steps inside of a while(1) will return EPERM for the
unpermitted ones. Repeated negative deltas are clamped without
error (but the kernel does log a notice).
Notes:
svn path=/head/; revision=45438
|
| |
|
|
|
|
|
|
| |
right. Add a clarifying (to me at least) comment. Some formatting
fixes.
Notes:
svn path=/head/; revision=45437
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1 second prior to the highest the clock has run so far. This allows
time adjusters like xntpd to do their work, but the worst a miscreant
can do is "freeze" the clock, not go back in time.
We still need to decide on an algorithm to clamp positive adjustments.
As it stands, it is possible to achieve arbitrary negative adjustments
by "wrapping" time around.
PR: 10361
Notes:
svn path=/head/; revision=45433
|
| |
|
|
| |
Notes:
svn path=/head/; revision=44272
|
| |
|
|
|
|
|
| |
kernel compile
Notes:
svn path=/head/; revision=43301
|
| |
|
|
|
|
|
| |
about unused variables, labels and other lint.
Notes:
svn path=/head/; revision=40648
|
| |
|
|
|
|
|
| |
Urged by: bde
Notes:
svn path=/head/; revision=36810
|
| |
|
|
|
|
|
|
|
| |
rev.1.9. Broken in: rev.1.50.
Fixed a spelling error. Obtained from: Lite2.
Notes:
svn path=/head/; revision=36128
|
| |
|
|
| |
Notes:
svn path=/head/; revision=36127
|
| |
|
|
|
|
|
|
|
| |
s/microruntime/microuptime/g
Reviewed by: bde
Notes:
svn path=/head/; revision=36119
|
| |
|
|
|
|
|
| |
as I don't want to mess with the multiple returns)
Notes:
svn path=/head/; revision=36035
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
signanosleep() did not deal with signal masks properly. This change was
based on a discussion with bde some time ago (at least 6 months or more).
signanosleep() should probably go away since it was never really used for
more than a few weeks and doesn't appear in released code. It should
probably be killed before somebody uses it and it becomes a gratuitous
nonstandard feature.
Notes:
svn path=/head/; revision=36032
|
| |
|
|
|
|
|
|
|
| |
more consistent.
OK'ed by: bde
Notes:
svn path=/head/; revision=35058
|
| |
|
|
|
|
|
| |
I hate the 2-arg time{spec|val}{add|sub} functions!
Notes:
svn path=/head/; revision=35045
|
| |
|
|
|
|
|
| |
fix the itimer(REAL) handling.
Notes:
svn path=/head/; revision=35044
|
| |
|
|
|
|
|
|
| |
documented in the man page and the standards). (and besides, nanosleep1
isn't setting it in this case at present anyway, so we'd be copying junk).
Notes:
svn path=/head/; revision=35043
|
| |
|
|
| |
Notes:
svn path=/head/; revision=35042
|
| |
|
|
|
|
|
| |
to usermode, otherwise sleep(3) fails, cron doesn't work, etc etc etc.
Notes:
svn path=/head/; revision=35040
|
| |
|
|
|
|
|
| |
Use tvtohz() a place where it fits.
Notes:
svn path=/head/; revision=35033
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Figure out UTC relative to boottime. Four new functions provide
time relative to boottime.
* move "runtime" into struct proc. This helps fix the calcru()
problem in SMP.
* kill mono_time.
* add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!)
* nanosleep, select & poll takes long sleeps one day at a time
Reviewed by: bde
Tested by: ache and others
Notes:
svn path=/head/; revision=35029
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.
Most uses of time.tv_sec now uses the new variable time_second instead.
gettime() changed to getmicrotime(0.
Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).
A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.
Add a new nfs_curusec() function.
Mark a couple of bogosities involving the now disappeard time variable.
Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.
Change profiling in ncr.c to use ticks instead of time. Resolution is
the same.
Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.
Reviewed by: bde
Notes:
svn path=/head/; revision=34961
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are atomic, but return in essence what is in the "time" variable.
gettime() is now a macro front for getmicrotime().
Various patches to use the two new functions instead of the various
hacks used in their absence.
Some puntuation and grammer patches from Bruce.
A couple of XXX comments.
Notes:
svn path=/head/; revision=34901
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
times consistently wrong (up to 1 tick too late), but recent changes
fixed the setting of the main clock, making other times inconsistent.
The inconsistencies tended to show up as a negative resource usage
for the process that set the time.
Fixed the check for setting the clock backwards. A stale timestamp
(`time') was checked, so it was possible to set the clock backwards
by up to almost 1 tick. Until recently, this bug was compensated
for by setting the clock consistently wrong.
Merged the comment about setting the clock backwards from Lite2.
Removed latency micro-optimizations/speed pessimizations in settime().
microtime() and set_timecounter() are relatively expensive, and
they must be called together with clock updates blocked to get a
consistent `delta', so significant latency optimizations are not
possible.
Removed some stale comments.
Notes:
svn path=/head/; revision=33818
|