Commit Graph

54 Commits

Author SHA1 Message Date
bjh21 1f4240a461 Extend NFS_V2_ONLY to remove NQNFS lease support as well. Saves another 10k. 2000-09-19 23:26:25 +00:00
itojun eb0816bfcb allow admins to disable pps rate limitation, by setting "maxpps"
parameter to negative value.
2000-08-02 12:24:11 +00:00
thorpej c55e09bd44 Add a comment about the hzto() return value. 2000-07-13 17:32:06 +00:00
jhawk 84fe4f536c Comment police. s/DIAGNOSTICS/DIAGNOSTIC/ 2000-07-09 14:13:04 +00:00
itojun d8a9a3cc7b add ppsratelimit(9), which does event-per-sec rate limitation.
use it from icmp6 error rate limitation code.
XXX better name for the function?
2000-07-09 06:44:57 +00:00
itojun 8f3d56a298 shorten splclock() period in ratelimit().
From: onoe
2000-07-09 06:40:08 +00:00
mrg 32aa199ccf remove include of <vm/vm.h> 2000-06-27 17:41:07 +00:00
thorpej 956b3ca3b3 Track which process a CPU is running/has last run on by adding a
p_cpu member to struct proc.  Use this in certain places when
accessing scheduler state, etc.  For the single-processor case,
just initialize p_cpu in fork1() to avoid having to set it in the
low-level context switch code on platforms which will never have
multiprocessing.

While I'm here, comment a few places where there are known issues
for the SMP implementation.
2000-05-31 05:02:31 +00:00
thorpej a7d0570e67 First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
2000-05-26 21:19:19 +00:00
augustss 264f1d27c6 Get rid of register declarations. 2000-03-30 09:27:11 +00:00
thorpej b667a5a357 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:30:07 +00:00
itojun 791a70292c correct ratecheck() signedness. without this fix, ratecheck() will never
success again after first success with lasttime=(0,0).
2000-02-16 12:36:19 +00:00
cgd dd84ecc7ac Implement ratecheck(), a function which can help programmers implement
rate-limited actions.  See ratecheck(9) for details of its use.
2000-02-03 23:04:45 +00:00
hwr 6d638c3405 If time delta is larger than thresh. Use 10* adj factor. Make this
work for negative deltas too. From NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
in kern/8589.
1999-10-10 18:41:53 +00:00
tron 992156ec89 Remove the prototype for settime(), it is in "sys/time.h" now. 1999-08-16 18:53:55 +00:00
tron 35ba1291c8 Make settime() public because we need to use it for the Linux emulation. 1999-08-16 18:42:25 +00:00
thorpej eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
thorpej 1c5f2999b2 Make sure `olddelta' is a valid pointer before performing the guts of
the adjtime(2) system call.  Fixes PR #7721, Darren Reed.
1999-06-07 22:33:53 +00:00
thorpej 7cc905f5c8 Add some braces to make egcs happy (ambiguous else warning). 1998-08-18 06:27:01 +00:00
perry 730baa7431 fix sizeofs so they comply with the KNF style guide. yes, it is pedantic. 1998-07-31 22:50:48 +00:00
thorpej 6b781d156f defopt NFSSERVER 1998-06-25 22:17:36 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
mycroft 28e8037334 Fix missing newline in time zone warning. 1998-02-20 07:22:14 +00:00
thorpej b0b3787d14 Include the NFS option header. 1998-02-19 00:47:02 +00:00
mycroft 2587de6af9 Adjust u_int arguments of some system calls to int, to match user-level
prototypes.
1997-10-15 17:03:52 +00:00
tls 3a98883bd3 Don't allow the time to be set backwards if in highly secure mode, since this would allow inode change times to be manipulated. 1997-04-26 21:22:57 +00:00
jtc 2114c082ae In nanosleep, use local error variable when storing rqtp in so that
an error from a failed tsleep will still be returned to the caller.
1997-04-21 16:56:54 +00:00
jtc c9b0c57620 Add POSIX.1b nanosleep(). 1997-04-16 14:41:28 +00:00
thorpej 55ee7ceeb8 NFSCLIENT -> NFS 1997-01-31 02:34:23 +00:00
perry b89a3425b7 Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
1997-01-15 01:28:28 +00:00
cgd e7af2a8237 * catch up with system call argument type fixups/const poisoning.
* Fix arguments to various copyin()/copyout() invocations, to avoid
  gratuitous casts.
* Some KNF formatting fixes
1996-12-22 10:21:06 +00:00
cgd 9ed8ce3b8f clean up a few spaces vs. tabs and KNF bogons. Make this compile
cleanly with -Wall -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual.
1996-11-15 23:53:32 +00:00
jtc d22cdecb45 Add clock_gettime, clock_settime, and clock_getres 1996-11-15 22:44:25 +00:00
cgd 574f71ab26 replace a construction in sys_setitimer() that was too tricky for its
(and my!) own good with a more straightforward one that is equally (and
more apparently) correct.
1996-10-24 04:35:33 +00:00
fvdl 56a654e17f Changes for NVSv3 code: pull in more NFS include files into kern_time.c
to get types right (overkill for just one function call, but oh well).
Clear B_NEEDCOMMIT in bdwrite().
1996-02-18 11:57:06 +00:00
christos 20df3b41ab uipc_proto.c: No need for the forward decls anymore; everything is prototyped.
kern_time.c: add header to get the NFS prototypes if needed.
1996-02-13 21:10:43 +00:00
christos 09afd77655 More proto fixes 1996-02-09 18:59:18 +00:00
christos 8a5b1b92e2 First pass at prototyping 1996-02-04 02:15:01 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej 60024eb978 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 21:40:36 +00:00
mycroft f75ba16b09 Update to use timer{add,sub}(). 1995-03-21 13:33:34 +00:00
mycroft f76536baea LEASE_UPDATETIME -> lease_updatetime 1994-12-13 22:19:45 +00:00
mycroft f9e259e3ca Use __timer{add,sub}(), not timeval{add,sub}(). Remove the latter completely. 1994-12-11 18:06:07 +00:00
cgd 6b86130410 update for new syscall args description mechanism 1994-10-20 04:22:35 +00:00
mycroft 61101c8fa5 Remove extern of tickadj. 1994-09-18 21:49:07 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
cgd 0d92ca456f update to Lite 1994-05-20 07:24:51 +00:00
mycroft 4b2f221eac Remove now-bogus casts. 1994-05-05 09:15:48 +00:00
cgd a0a7429482 lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.
1994-05-05 05:35:42 +00:00
mycroft 21edb9924e Canonicalize all #includes. 1993-12-18 03:59:02 +00:00