History log of /freebsd/sys/kern/kern_time.c (Results 151 – 175 of 411)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/5.3.0_cvs, release/5.3.0
# 78c85e8d 05-Oct-2004 John Baldwin <jhb@FreeBSD.org>

Rework how we store process times in the kernel such that we always store
the raw values including for child process statistics and only compute the
system and user timevals on demand.

- Fix the var

Rework how we store process times in the kernel such that we always store
the raw values including for child process statistics and only compute the
system and user timevals on demand.

- Fix the various kern_wait() syscall wrappers to only pass in a rusage
pointer if they are going to use the result.
- Add a kern_getrusage() function for the ABI syscalls to use so that they
don't have to play stackgap games to call getrusage().
- Fix the svr4_sys_times() syscall to just call calcru() to calculate the
times it needs rather than calling getrusage() twice with associated
stackgap, etc.
- Add a new rusage_ext structure to store raw time stats such as tick counts
for user, system, and interrupt time as well as a bintime of the total
runtime. A new p_rux field in struct proc replaces the same inline fields
from struct proc (i.e. p_[isu]ticks, p_[isu]u, and p_runtime). A new p_crux
field in struct proc contains the "raw" child time usage statistics.
ruadd() has been changed to handle adding the associated rusage_ext
structures as well as the values in rusage. Effectively, the values in
rusage_ext replace the ru_utime and ru_stime values in struct rusage. These
two fields in struct rusage are no longer used in the kernel.
- calcru() has been split into a static worker function calcru1() that
calculates appropriate timevals for user and system time as well as updating
the rux_[isu]u fields of a passed in rusage_ext structure. calcru() uses a
copy of the process' p_rux structure to compute the timevals after updating
the runtime appropriately if any of the threads in that process are
currently executing. It also now only locks sched_lock internally while
doing the rux_runtime fixup. calcru() now only requires the caller to
hold the proc lock and calcru1() only requires the proc lock internally.
calcru() also no longer allows callers to ask for an interrupt timeval
since none of them actually did.
- calcru() now correctly handles threads executing on other CPUs.
- A new calccru() function computes the child system and user timevals by
calling calcru1() on p_crux. Note that this means that any code that wants
child times must now call this function rather than reading from p_cru
directly. This function also requires the proc lock.
- This finishes the locking for rusage and friends so some of the Giant locks
in exit1() and kern_wait() are now gone.
- The locking in ttyinfo() has been tweaked so that a shared lock of the
proctree lock is used to protect the process group rather than the process
group lock. By holding this lock until the end of the function we now
ensure that the process/thread that we pick to dump info about will no
longer vanish while we are trying to output its info to the console.

Submitted by: bde (mostly)
MFC after: 1 month

show more ...


# de0a9241 22-Jun-2004 Kelly Yancey <kbyanc@FreeBSD.org>

Update previous commit to:
* Obtain/release schedlock around calls to calcru.
* Sort switch cases which do not cascade per style(9).
* Sort local variables per style(9).
* Remove "superfluous

Update previous commit to:
* Obtain/release schedlock around calls to calcru.
* Sort switch cases which do not cascade per style(9).
* Sort local variables per style(9).
* Remove "superfluous" whitespace.
* Cleanup handling of NULL uap->tp in clock_getres(). It would probably
be better to return EFAULT like clock_gettime() does by passing the
pointer to copyout(), but I presume it was written to not fail on
purpose in the original code. I'll defer to -standards on this one.

Reported by: bde

show more ...


# b8817154 18-Jun-2004 Kelly Yancey <kbyanc@FreeBSD.org>

Implement CLOCK_VIRTUAL and CLOCK_PROF for clock_gettime(2) and
clock_getres(2).

Reviewed by: phk
PR: 23304


Revision tags: release/4.10.0_cvs, release/4.10.0
# 7f8a436f 05-Apr-2004 Warner Losh <imp@FreeBSD.org>

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core


Revision tags: release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0
# 6ff7636e 26-Oct-2003 Alfred Perlstein <alfred@FreeBSD.org>

constify the second args to timevaladd() and timevalsub().


# 677b542e 11-Jun-2003 David E. O'Brien <obrien@FreeBSD.org>

Use __FBSDID().


# 5499ea01 09-Jun-2003 John Baldwin <jhb@FreeBSD.org>

Wait for the real interval timer callout handler to finish executing if it
is currently executing when we try to remove it in exit1(). Without this,
it was possible for the callout to bogusly rearm

Wait for the real interval timer callout handler to finish executing if it
is currently executing when we try to remove it in exit1(). Without this,
it was possible for the callout to bogusly rearm itself and eventually
refire after the process had been free'd resulting in a panic.

PR: kern/51964
Reported by: Jilles Tjoelker <jilles@stack.nl>
Reviewed by: tegge, bde

show more ...


Revision tags: release/5.1.0_cvs, release/5.1.0
# 25b4d3a8 13-May-2003 John Baldwin <jhb@FreeBSD.org>

In setitimer(2), if the it_value of the new itimer value is clear, then
don't add the current time to it, but leave it as clear so that when the
timer is disabled, the it_value is always clear.

Revi

In setitimer(2), if the it_value of the new itimer value is clear, then
don't add the current time to it, but leave it as clear so that when the
timer is disabled, the it_value is always clear.

Reviewed by: bde
Approved by: re (rwatson)

show more ...


Revision tags: release/4.8.0_cvs, release/4.8.0
# 893bec80 26-Feb-2003 Sam Leffler <sam@FreeBSD.org>

o fix ppsratecheck to interpret a maxpps of zero as "ignore everything"
o add a comment explaining the significance of using 0 or -1 (actually
any negative value) for maxpps


# 5cb3dc8f 23-Feb-2003 Poul-Henning Kamp <phk@FreeBSD.org>

OK, I was too sleepy there...

Pointy hat over here!


# 8f5ef1a9 23-Feb-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Implement CLOCK_MONOTONIC.


# d6bf2378 20-Feb-2003 Olivier Houchard <cognet@FreeBSD.org>

Remove duplicate includes.

Submitted by: Cyril Nguyen-Huu <cyril@ci0.org>


# 96d7f8ef 17-Feb-2003 Tim J. Robbins <tjr@FreeBSD.org>

Use the proc lock to protect p_realtimer instead of Giant, and obtain
sched_lock around accesses to p_stats->p_timer[] to avoid a potential
race with hardclock. getitimer(), setitimer() and the reali

Use the proc lock to protect p_realtimer instead of Giant, and obtain
sched_lock around accesses to p_stats->p_timer[] to avoid a potential
race with hardclock. getitimer(), setitimer() and the realitexpire()
callout are now Giant-free.

show more ...


# 91f1c2b3 03-Feb-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Split the global timezone structure into two integer fields to
prevent the compiler from optimizing assignments into byte-copy
operations which might make access to the individual fields non-atomic.

Split the global timezone structure into two integer fields to
prevent the compiler from optimizing assignments into byte-copy
operations which might make access to the individual fields non-atomic.

Use the individual fields throughout, and don't bother locking them with
Giant: it is no longer needed.

Inspired by: tjr

show more ...


# b338d59f 03-Feb-2003 Tim J. Robbins <tjr@FreeBSD.org>

No need to lock Giant around call to nanosleep1() in nanosleep().


# 411c25ed 03-Feb-2003 Tim J. Robbins <tjr@FreeBSD.org>

Avoid holding Giant across copyout() in gettimeofday() and getitimer().


# 5cb6b2ca 19-Jan-2003 Tim J. Robbins <tjr@FreeBSD.org>

Remove unnecessary locking of Giant around nanotime() in clock_gettime().


# 31f3e2ad 19-Jan-2003 Alfred Perlstein <alfred@FreeBSD.org>

useracc() is mpsafe so we only need to hold Giant
over the call to nanosleep1()

Pointed out by: tjr


Revision tags: release/5.0.0_cvs, release/5.0.0
# addea9d4 31-Dec-2002 Sam Leffler <sam@FreeBSD.org>

o reduce the overhead of calling ppsratecheck by using ticks instead of
calling getmicrouptime (but maintain the struct timeval-based calling
convention for compatibility)
o eliminate the use of

o reduce the overhead of calling ppsratecheck by using ticks instead of
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

show more ...


# 91974ce1 21-Dec-2002 Sam Leffler <sam@FreeBSD.org>

add generic rate limiting support from netbsd; ratelimit is purely time based,
ppsratecheck is for controlling packets/second

Obtained from: netbsd


# d1e405c5 14-Dec-2002 Alfred Perlstein <alfred@FreeBSD.org>

SCARGS removal take II.


# bc9e75d7 13-Dec-2002 Alfred Perlstein <alfred@FreeBSD.org>

Backout removal SCARGS, the code freeze is only "selectively" over.


# 0bbe7292 13-Dec-2002 Alfred Perlstein <alfred@FreeBSD.org>

Remove SCARGS.

Reviewed by: md5


# 4b8d5f2d 03-Nov-2002 Robert Watson <rwatson@FreeBSD.org>

Introduce mac_check_system_settime(), a MAC check allowing policies to
augment the system policy for changing the system time.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associat

Introduce mac_check_system_settime(), a MAC check allowing policies to
augment the system policy for changing the system time.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories

show more ...


Revision tags: release/4.7.0_cvs
# ac0653dc 25-Sep-2002 Bruce Evans <bde@FreeBSD.org>

Round up instead of towards 0 in clock_getres() so that a resolution of
0 is never returned.

PR: 41781
MFC after: 3 days


12345678910>>...17