summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Fixed some style bugs (mainly ones associated with the bogus namebde2000-01-241-8/+6
| | | | condev_t for a non-typedef).
* Backout previous commit. It was a mistake.bp2000-01-231-1/+1
|
* Replace non obvious number with SPECNAMELEN constant.bp2000-01-231-1/+1
| | | | Reviewed by: phk
* Add a couple of strategic sysctls for monitoring.phk2000-01-231-4/+30
| | | | | In the rather obscure case of hardpps(), use a type-II PLL if the external signal is phase locked, but a FLL if it isn't.
* Fix the style bugs in the style bugs fix. The style bug fix made theimp2000-01-211-4/+6
| | | | | new function inconsistant with the rest of this file. The spelling and grammer fixes were good and remain.
* Fix style bugs in the last commit.green2000-01-211-10/+8
|
* bdeize last commit:imp2000-01-201-3/+0
| | | | | | o Remove opt_dontuse.h and ifdef PROCFS Subitted by: bde, peter
* Back out the previous spl change, since it opens a race window.jasone2000-01-201-1/+1
| | | | Reviewed by: alfred, dillon, peter
* When we are execing a setugid program, and we have a procfs filesystemimp2000-01-202-0/+60
| | | | | | | | file open in one of the special file descriptors (0, 1, or 2), close it before completing the exec. Submitted by: nergal@idea.avet.com.pl Constructive comments: deraadt@openbsd.org, sef, peter, jkh
* Don't tsleep() while at splbio().jasone2000-01-201-2/+12
| | | | | | | Correctly return EINPROGRESS from aio_error() even when an aio request is still in the socket queue. Submitted by: Adrian Chadd <adrian@bofh.co.uk>
* Fix bde'isms in acl/extattr syscall interface, renaming syscalls torwatson2000-01-194-61/+49
| | | | | | prettier (?) names, adding some const's around here, et al. Reviewed by: bde
* Fix bde'isms in acl/extattr syscall interface, renaming syscalls torwatson2000-01-192-18/+18
| | | | | | | | prettier (?) names, adding some const's around here, et al. Commit 2 out of 3. Reviewed by: bde
* Fix bde'isms in acl/extattr syscall interface, renaming syscalls torwatson2000-01-191-12/+25
| | | | | | | | prettier (?) names, adding some const's around here, et al. Commit 1 out of 3. Reviewed by: bde
* Need to reset the buffer pointer to avoid reconsidering the same buffermckusick2000-01-181-0/+1
| | | | | | | again (without this the rollback analysis was being lost). Should reduce the write count for most workloads. Submitted by: Craig A Soules <soules+@andrew.cmu.edu>
* Fix vn_isdisk() usage to make AIO work on non-disk-files again, rathergreen2000-01-171-2/+11
| | | | | | | than just return ENOTBLK. PR: 16163 Submitted by: Adrian Chadd <adrian@FreeBSD.org>
* Implement setres[ug]id() and getres[ug]id(). This has been sitting inpeter2000-01-164-8/+172
| | | | | | | my tree for ages (~2 years) waiting for an excuse to commit it. Now Linux has implemented it and it seems that Staroffice (when using the linux_base6.1 port's libc) calls this in the linux emulator and dies in setup. The Linux emulator can call these now.
* Cleanup some more remaining bdev fluff.phk2000-01-161-70/+18
|
* Add aio_waitcomplete(). Make aio work correctly for socket descriptors.jasone2000-01-148-504/+647
| | | | | | | | Make gratuitous style(9) fixes (me, not the submitter) to make the aio code more readable. PR: kern/12053 Submitted by: Chris Sedore <cmsedore@maxwell.syr.edu>
* Allow SMP systems with an MCA bus to work properly.mdodd2000-01-131-4/+6
| | | | Reviewed by: peter
* Seconds to ticks conversion was done at the wrong place.luoqi2000-01-121-2/+2
|
* Add a new mechanism, cndbctl(), to tell the console driver thatyokota2000-01-112-5/+19
| | | | | | | | | | | | | | | | | | | | | ddb is entered. Don't refer to `in_Debugger' to see if we are in the debugger. (The variable used to be static in Debugger() and wasn't updated if ddb is entered via traps and panic anyway.) - Don't refer to `in_Debugger'. - Add `db_active' to i386/i386/db_interface.d (as in alpha/alpha/db_interface.c). - Remove cnpollc() stub from ddb/db_input.c. - Add the dbctl function to syscons, pcvt, and sio. (The function for pcvt and sio is noop at the moment.) Jointly developed by: bde and me (The final version was tweaked by me and not reviewed by bde. Thus, if there is any error in this commit, that is entirely of mine, not his.) Some changes were obtained from: NetBSD
* Also handle zero return from dscheck().phk2000-01-101-1/+1
| | | | PR: 15956
* Give vn_isdisk() a second argument where it can return a suitable errno.phk2000-01-105-20/+42
| | | | Suggested by: bde
* Panic if proc0 hasn't been created and we try to call kthread_create.imp2000-01-101-0/+5
| | | | | | | This prevents a more mysterious crash later. XXX The long term solution is defer creation of these things until XXX proc0 lives
* Handle the case where we truss an SUGID program -- in particular, we needsef2000-01-102-1/+2
| | | | | | | | to wake up any processes waiting via PIOCWAIT on process exit, and truss needs to be more aware that a process may actually disappear while it's waiting. Reviewed by: Paul Saab <ps@yahoo-inc.com>
* Several performance improvements for soft updates have been added:mckusick2000-01-101-5/+144
| | | | | | | | | | | | | | | 1) Fastpath deletions. When a file is being deleted, check to see if it was so recently created that its inode has not yet been written to disk. If so, the delete can proceed to immediately free the inode. 2) Background writes: No file or block allocations can be done while the bitmap is being written to disk. To avoid these stalls, the bitmap is copied to another buffer which is written thus leaving the original available for futher allocations. 3) Link count tracking. Constantly track the difference in i_effnlink and i_nlink so that inodes that have had no change other than i_effnlink need not be written. 4) Identify buffers with rollback dependencies so that the buffer flushing daemon can choose to skip over them.
* Add bwillwrite to all system calls that create things in the filesystem.mckusick2000-01-103-0/+19
| | | | Benchmarks that create huge trees of empty files overwhelm the buffer cache.
* Remove the P_BUFEXHAUST flag from the syncer process (leavingmckusick2000-01-102-4/+0
| | | | | | | | | | | | it only on the buf_daemon process). The problem is that when the syncer process starts running the worklist, it wants to delete lots of files. It does this by VFS_VGET'ing the vnodes, clearing the blocks in them and bdwrite'ing the buffer. It can process close to a thousand files per second which generates a large number of dirty buffers. So, giving it special priviledge at the buffer trough leads to trouble as the buf_daemon does occationally need a free buffer to proceed and if the syncer has used every last one up, we are toast.
* Change NDFREE() from a macro to a function for the time being; the macroeivind2000-01-082-0/+68
| | | | | | | version caused intolerable bloat (30k). I'm likely to revisit this with an attempt at a smarter macro. Bloat noticed by: bde
* Allow SMP && NCPU == 1 to work. From now on, there's no restriction on theluoqi2000-01-071-2/+4
| | | | | value of NCPU relative to the number of cpus physically present, the actual number of cpus utilized will be the smaller of the two.
* Introduce a mechanism to suspend/resume system processes. Suspend syncerluoqi2000-01-075-24/+121
| | | | and bufdaemon prior to disk sync during system shutdown.
* Export the nselcoll counter via the kern.nselcoll sysctl so we can seepeter2000-01-051-1/+3
| | | | | | just how bad it gets in various situations. Reminded by: adrian
* Enhance reassignbuf(). When a buffer cannot be time-optimally inserteddillon2000-01-052-4/+38
| | | | | | | | | | | | | | | | | | | into vnode dirtyblkhd we append it to the list instead of prepend it to the list in order to maintain a 'forward' locality of reference, which is arguably better then 'reverse'. The original algorithm did things this way to but at a huge time cost. Enhance the append interlock for NFS writes to handle intr/soft mounts better. Fix the hysteresis for NFS async daemon I/O requests to reduce the number of unnecessary context switches. Modify handling of NFS mount options. Any given user option that is too high now defaults to the kernel maximum for that option rather then the kernel default for that option. Reviewed by: Alfred Perlstein <bright@wintelcom.net>
* ISA device drivers use the ISA source interrupt number in locations wheretegge2000-01-041-6/+64
| | | | | | | | | | | | | | the low level interrupt handler number should be used. Change setup_apic_irq_mapping() to allocate low level interrupt handler X (Xintr${X}) for any ISA interrupt X mentioned in the MP table. Remove an assumption in the driver for the system clock (clock.c) that interrupts mentioned in the MP table as delivered to IOAPIC #0 intpin Y is handled by low level interrupt handler Y (Xintr${Y}) but don't assume that low level interrupt handler 0 (Xintr0) is used. Don't allocate two low level interrupt handlers for the system clock. Reviewed by: NOKUBI Hirotaka <hnokubi@yyy.or.jp>
* Be more careful about NOUDEV and NODEV.phk2000-01-041-0/+8
| | | | Submitted by: bde
* Create a separate pps_offset variable to use for applying thephk2000-01-041-1/+8
| | | | | | | | | | | hardpps() produced offset component. This is tested and behaved stable with frequency offsets from -338.05 to +499.91 PPM. Interestingly the machine I tested this on would fail if the clock were slower than 14.3132 MHz whereas it was perfectly happy to run at 16.384 MHz, in other words [-340PPM ... +14.4%] Make pps_shift tweakable with sysctl.
* truss /usr/bin/suphk2000-01-031-2/+2
| | | | | | | | | | | | | | | | login (or not if root) then exit the shell truss will get stuct in tsleep I dont know if this is correct, but it fixes the problem and according to the commends in pioctl.h, PF_ISUGID is set when we want to ignore UID changes. The code is checking for when PF_ISUGID is not set and since it never is set, we always ignore UID changes. Submitted by: Paul Saab <ps@yahoo-inc.com>
* Don't use time_offset as a leaky bucket variable in hardpps(), thisphk1999-12-291-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | resulted in vastly optimistic offset values reported to userland (typically a factor 40+ too small). Apart from that, the code had two sign-bugs. Apply the hardpps() phase with the right sign with a simply scaling by integration interval. (This may be too stiff at long integration intervals, see below). Allow pps_shiftmax to be reduced again. Before this, the phase lock in hardpps() were broken, but due to two bugs mostly cancelling out, it would end up basically working with a large stochastic component. Now it behaves as one would expect: smooth and quiet. It seems that pps_shiftmax above 7..9 somewhere makes the phaselock too weak to hold onto random walk phase errors from a HP-105 OCXO, which basically means that it is too weak for real-life use with such integration times. This is yet to be resolved. Submitted to: Prof. Dave "NTP" Mills. Tested by: Terje Mathisen <Terje.Mathisen@hda.hydro.com>
* Remove vnode_if.sh - it's a perl script. This stayed around for a whilepeter1999-12-291-354/+0
| | | | | | because bsd.kmod.mk is usually out of sync with kernel source. However bsd.kmod.mk has to be updated now because of the _KERNEL change so there is no need to keep this (pre-repo copy) version around.
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-293-14/+14
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Actively limit the allocation of mbufs to NMBUFS/nmbufs and mbuf clustersmsmith1999-12-281-2/+22
| | | | | | | | to NMBCLUSTERS/nmbclusters/kern.ipc.nmbclusters. Add a read-only sysctl kern.ipc.nmbufs matching kern.ipc.nmbclusters. Submitted by: Bosko Milekic <bmilekic@dsuper.net>
* Changed the type used to represent the user stack pointer from `long *'bde1999-12-272-8/+8
| | | | | | | | to `register_t *'. This fixes bugs like misplacement of argc and argv on the user stack on i386's with 64-bit longs. We still use longs to represent "words" like argc and argv, and assume that they are on the stack (and that there is stack). The suword() and fuword() families should also use register_t.
* Fixed some type mismatches. p_retval[0] in struct proc has typebde1999-12-271-10/+12
| | | | | | register_t, so pointers to it must be passed around as `register_t *', not as `int *'. The type mismatches were non-benign on alphas, but the broken code is normally only configured by LINT.
* Correct an uninitialized variable use, which, unlike most times, isgreen1999-12-271-4/+2
| | | | | | | actually a bug this time. Submitted by: bde Reviewed by: bde
* Removed unused includes.bde1999-12-261-26/+12
| | | | | | | Rumoved unused compatibility cruft for dup(). Using it today would just break dup() on fd's >= 64. Fixed some style bugs.
* Use vfs_timestamp() instead of getnanotime() to set timestamps. Thisbde1999-12-261-3/+4
| | | | | | | fixee incoherency of pipe timestamps relative to file timestamps in the usual case where getnanotime() is not used for the latter. (File and pipe timestamps are still incoherent relative to real time unless the vfs_timestamp_precision sysctl is set to 2 or 3).
* * Set the devclass of a device before calling the probe method. This allowsdfr1999-12-241-1/+12
| | | | | device_printf() etc. to print something intelligible. * Allow device_set_devclass(dev, 0) for clearing the devclass.
* Fixed a cast of a pointer to an integer of a possibly different size.bde1999-12-243-8/+8
| | | | | Fixed casts of non-`void *' pointers to uintptr_t. Fixed related style bugs. This file uses perfectly non-KNF formatting for casts.
* Prettyness police: Identify flags in b_xflags with BX_ to distinguishmckusick1999-12-222-34/+38
| | | | them from flags in b_flags which are prefixed with B_
* regenerate after making getfh a standard syscall.alfred1999-12-211-1/+1
|
OpenPOWER on IntegriCloud