Commit Graph

1962 Commits

Author SHA1 Message Date
ross 1ff9cacc0c Back out a small and unfinished piece of the old scheduler rototill. 1999-10-14 05:59:57 +00:00
thorpej e3203cc4b6 Detect if kmem is up, and if not, ignore EX_MALLOCOK. 1999-10-11 22:57:17 +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
mycroft fde519b5e2 Widen usecount and writecount to prevent overflow. 1999-10-01 22:03:17 +00:00
mycroft 5e7ae44739 Correct spelling in an #ifdef. 1999-10-01 21:57:42 +00:00
bouyer 52497e180a Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.
1999-09-28 14:47:00 +00:00
kleink c13a492388 1003.1c: add {LOGIN_NAME_MAX}. 1999-09-27 16:24:39 +00:00
minoura be7984a052 First step toward network boot.
By Takeshi Nakayama <tn@catvmics.ne.jp>.
1999-09-23 15:14:57 +00:00
thorpej 0d7a86c356 - Centralize the declaration and clearing of `cold'.
- Call configure() after setting up proc0.
- Call initclocks() from configure(), after cpu_configure().  Once the
  clocks are running, clear `cold'.  Then run interrupt-driven
  autoconfiguration.
1999-09-17 20:11:56 +00:00
thorpej 11cae42531 Centralize the declaration and clearing of `cold'. 1999-09-17 19:59:35 +00:00
thorpej 6266379c9d Be slightly more informative in the tsleep() diagnostics. 1999-09-15 21:54:57 +00:00
thorpej e8431098fe Add a mechanism to defer configuration of children until interrupts
are enabled.
1999-09-15 19:37:08 +00:00
thorpej 3b01d1b872 Rename the machine-dependent autoconfiguration entry point `cpu_configure()',
and rename config_init() to configure() and call cpu_configure() from there.
1999-09-15 18:10:33 +00:00
itojun 65363da25e Merge in NetBSD/sh3 from cvs.kame.net repository.
Tree structure:
- sys/arch/sh3: sh3 generic code
	As commented, in-chip device drivers are put into sys/arch/sh3/dev.
- sys/arch/evbsh3: sh3 evaluation boards (pure sh3 CPU, no fancy external HW)
- sys/arch/mmeye: Brains mmEye, www.brains.co.jp
MI source code includes couple of #ifdef for sh3-coff support.
(sh3 uses coff or elf)

Needs some more improvements, especialy in sys/arch/sh3/conf/files.sh3,
to compile the tree (due to last minute tree structure change).
1999-09-13 10:30:21 +00:00
mycroft 34b45d9bd7 Obey negative cache entries for intermediate directories during a create. 1999-09-10 23:24:23 +00:00
sommerfeld c450ebbbe7 If using kernel PLL (for NTP), initialize "fixtick" to a reasonable
approximation of reality if the MD code doesn't.  This variable is the
equivalent of "tickfix" for the non-NTP path.

This allows an alpha kernel (where hz=1024) with "options NTP" to
synch up quite nicely (as opposed to having an frequency error of
~560ppm, which is outside the capture range of the PLL).
1999-09-06 20:44:02 +00:00
hubertf abda8d9447 Allow hardlinks to symlinks.
Reviewed by: Bill Studenmund, Klaus Klein
1999-09-05 23:34:39 +00:00
jdolecek 026b142488 Change cache_lookup() as per discussion on tech-kern & ICB:
If the entry is found in name cache, cache_lookup() does all the
necessary locking now, simplifying the interface and making the
code easier to follow and maintain.

The code now also removes the entry from cache when it's either invalid
(vget() fails) or the vnode has been recycled while waiting for the lock.
In that case, unlock/relock of the directory vnode has been eliminated too.
Both changes could lead to sligh performace improvement in same cases.

Furthermore, obscure bug has been found and eliminated for ISDOTDOT in the
lockparent && ISLASTCN case: if the vget() succeded and the re-lock
of the directory vnode not, we returned the error with the '..' vnode still
locked.

For simplicity, cache_lookup() now returns 0 if the positive entry was found
in cache, -1 if not found and ENOENT or error returned by the locking
functions in any other case.

Many thanks to Bill Studenmund and especially Charles Hannum
for invaluable advices and code to get this right.

Tested by: jdolecek
Rewieved by: wrstuden, mycroft
1999-09-05 14:22:34 +00:00
jdolecek e49c7e1186 LMREADY: kill the DEBUG message "LKM: try ready"
LMLOADSYMS: print the DEBUG message only when (lkm_debug & LKMDB_LOAD)
1999-09-03 17:07:52 +00:00
bouyer 051211ffa9 Add a new flag, used by vn_open() which prevent symlinks from being followed
at open time. Use this to prevent coredump to follow symlinks when the
kernel opens/creates the file.
1999-08-31 12:30:35 +00:00
thorpej c2ce79c0c9 In _pool_put(), panic if we're put'ing with nout == 0. This will help us
detect a little earlier if we've dup-put'd.  Otherwise, underflow occurs,
and subsequent allocations simply hang or fail (it thinks the hardlimit
has been reached).
1999-08-29 00:26:01 +00:00
thorpej 8d4e2a9293 Make it possible to direct LOCKDEBUG messages to syslog only. 1999-08-27 01:14:38 +00:00
thorpej 0038e42900 Implement vlog() (varargs version of log()). 1999-08-27 01:14:15 +00:00
thorpej 4aafee104b Regen. 1999-08-25 05:06:31 +00:00
thorpej dc8ecaa15b Overhaul of the SVID IPC facilities, primarily to use the types specified
by the Single UNIX Specification version 2, rather than the SVR2-derived
types.  While I was here, I did a namespace sweep to expose the constants
and strucutures, and structure members described by SUSv2; documentation
updates coming shortly.

Fixes kern/8158.
1999-08-25 05:05:48 +00:00
thorpej 0174ee34d0 Add COMPAT_14. 1999-08-25 04:55:53 +00:00
wrstuden ba891a728d Deal with device vnodes which aren't on the spechash tables, rather than
panicing. So now we make sure vp->v_hashchain != NULL before removing
the node from the chain.
1999-08-20 22:21:25 +00:00
thorpej a21be175c5 Clean up some whitespace issues in the generated syscallargs.h file. 1999-08-20 19:07:31 +00:00
thorpej f2c2e160b1 Fix "print vnodes for dirty buffers" change: use vprint(); VOP_PRINT()
is only meant to be used by vprint(), and vprint() provides more
information about the vnode.
1999-08-19 18:09:44 +00:00
simonb c620766979 In vfs_shutdown() print any vnodes for busy buffers if DEBUG is defined.
Patch from Bill Studenmund.
1999-08-19 13:54:06 +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
ross 2f76dd5371 In getnewvnode(), initialize v_interlock when the vnode comes from the
pool allocator.
1999-08-14 06:23:59 +00:00
wrstuden 14693e0ca1 Modify comments regarding VOP_LOOKUP. Revised lookup description, and also
document both cases which can set PDIRUNLOCK.

Reviewed by Bill Sommerfeld.
1999-08-11 00:20:50 +00:00
thorpej cca4496da7 Use cpuid_t and cpu_number(). 1999-08-10 21:10:20 +00:00
ross ff87f817c1 Call stopprofclock(p) from sys_execve(). 1999-08-09 02:42:20 +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
sommerfeld 2aa9696fee Implement arp_drain(), which frees packets tied up in the arp cache if
mbufs are in short supply.
Create a (trivial) protocol domain for arp so that the drain routine will
be called from m_reclaim()
1999-08-05 04:04:28 +00:00
sommerfeld b8e4538f80 Create new pool flag PR_LIMITFAIL, indicating that even PR_WAIT
allocations should fail if the pool is at its hard limit.
Document flag in pool(9).
Use it in mbuf.h for the first allocate call for M_GET, M_GETHDR, and
MCLGET, so that m_reclaim gets called even for blocking allocations.
1999-08-05 04:00:03 +00:00
thorpej 428443a130 Add some more diagnostic information to the 3 different `panic("m_copym")'
calls.
1999-08-05 02:24:29 +00:00
mycroft f85ee5e22e The old compaction test had an off-by-one error that caused it to not compact
in some cases where it could have.  Fix this, and the new version as well.
1999-08-04 22:33:20 +00:00
matt 0dc0497a97 Don't compress mbuf clusters which are referenced by multiple
mbufs since you might overwriting valuable data.  (think of
m_copy'ed data from a TCP re-transmission queue.  Since those
might be in clusters and referenced in two sockets).
1999-08-04 21:40:39 +00:00
mycroft 545d8679c0 It's now possible for sbcompress() to compact mbuf clusters, so do it.
This helps prevent mbuf cluster exhaustion when receiving lots of small
packets.
1999-08-04 21:30:12 +00:00
wrstuden 3bf14d81e9 Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden
1999-08-03 20:19:16 +00:00
wrstuden ae0b6372e0 Regen for revision: 1.19 of vnode_if.src. 1999-08-03 18:20:22 +00:00
wrstuden 5896b56eae Add VOP_FCNTL. 1999-08-03 18:19:08 +00:00
wrstuden cca0c4f6de Modify how lookup walks up mount points. As suggested by Konrad
Schroder <perseant@hitl.washington.edu>, unlock the mounted on
vnode before we call VFS_ROOT so that we cover the case where the new
root vnode shares a lock with the mounted-on vnode. Note that we have
asserted vfs_busy on the new fs before unlocking, so no other process can
steal the mount out from under us.
1999-08-03 18:17:24 +00:00
christos 93146392a8 OpenBSD patch to prevent non-root users who own block or character devices
(typically ttys or ptys) from changing the flags on them. [Commit by cjs.]
1999-07-31 03:18:43 +00:00
sommerfeld 3267e5e87d Probable fix for PR7943: lookups fail spuriously over NFS.
The problem was due to an interaction between the doomed unmounts done by
amd and getnewvnode.
I convinced myself that it's ok for getnewvnode() to do a sleeping vfs_busy().

Tested with multiple builds running while another process attempted to unmount
/usr once a second.
1999-07-29 13:31:45 +00:00
thorpej cb41412726 Fix a thinko in draining of spin locks: bump waitcount in the spin case,
too.  Remove some needless code duplication by adding a "drain" argument
to the ACQUIRE() macro (compiler can [and does] optimize the constant
conditional).
1999-07-28 19:29:39 +00:00