summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Remove a bogus #ifdef KTR stanza.phk2001-01-011-7/+0
| | | | Noticed by: Alexander Langer <alex@big.endian.de>
* Push down sched_lock in psignal(). sched_lock was being held acrossjhb2001-01-011-4/+21
| | | | | recursive calls into psignal() as well as calls to signotify(), forward_signal(), etc.
* Add in a missing release of the proctree lock.jhb2001-01-011-0/+1
| | | | Submitted by: Sja <sakari.jalovaara@eqonline.fi>
* there is no more miscfs/devfsmjacob2000-12-311-1/+0
|
* Ignore a net interrupt if the corresponding handler is nottanimura2000-12-311-1/+4
| | | | | | | registered. This fixes panic on my laptop where a spurious arp packet is received when arp is not ready to run.
* Backout rev 1.57 & 1.58. While the previous revisions fixedps2000-12-311-1/+0
| | | | | | attaching to running processes, it completely breaks normal debugging. A better fix is in the works, but cannot be properly tested until the problem with gdb hanging the system in -current is solved.
* Pass me the pointy hat. Do not hold sched_lock over psignal.ps2000-12-301-1/+1
| | | | Submitted by: alfred
* Partially revert revision 1.7: Only use getnanotime instead ofgrog2000-12-291-1/+9
| | | | | | | nanotime if we would run into trouble with nanotime (i.e. if we are tracing KTR_LOCK). Reviewed by: jhb
* Retire kernfs (kernel part).des2000-12-282-3/+1
|
* Send a SIGCONT when detaching or continuing the excution of a tracedps2000-12-281-0/+1
| | | | | | | | process. This fixes a problem when attaching to a process in gdb and the process staying in the STOP'd state after quiting gdb. This whole process seems a bit suspect, but this seems to work. Reviewed by: peter
* Pull out the module path from the loader. ie: if you boot frompeter2000-12-281-4/+8
| | | | | | | | /boot/kernel.foobar/* then that had better be in the path ahead of the others. Submitted by: Daniel J. O'Connor <darius@dons.net.au> PR: 23662
* This implements a better launder limiting solution. There was a solutiondillon2000-12-262-137/+138
| | | | | | | | | | | | | | | | | | | in 4.2-REL which I ripped out in -stable and -current when implementing the low-memory handling solution. However, maxlaunder turns out to be the saving grace in certain very heavily loaded systems (e.g. newsreader box). The new algorithm limits the number of pages laundered in the first pageout daemon pass. If that is not sufficient then suceessive will be run without any limit. Write I/O is now pipelined using two sysctls, vfs.lorunningspace and vfs.hirunningspace. This prevents excessive buffered writes in the disk queues which cause long (multi-second) delays for reads. It leads to more stable (less jerky) and generally faster I/O streaming to disk by allowing required read ops (e.g. for indirect blocks and such) to occur without interrupting the write stream, amoung other things. NOTE: eventually, filesystem write I/O pipelining needs to be done on a per-device basis. At the moment it is globalized.
* Protect proc.p_pptr and proc.p_children/p_sibling with thejake2000-12-239-24/+82
| | | | | | | | proctree_lock. linprocfs not locked pending response from informal maintainer. Reviewed by: jhb, -smp@
* Make sure we have a non-null proc pointer before referring to fieldsmjacob2000-12-231-1/+1
| | | | off of it.
* * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.bmilekic2000-12-214-22/+22
| | | | | | | | | | | | | | | | | | This is because calls with M_WAIT (now M_TRYWAIT) may not wait forever when nothing is available for allocation, and may end up returning NULL. Hopefully we now communicate more of the right thing to developers and make it very clear that it's necessary to check whether calls with M_(TRY)WAIT also resulted in a failed allocation. M_TRYWAIT basically means "try harder, block if necessary, but don't necessarily wait forever." The time spent blocking is tunable with the kern.ipc.mbuf_wait sysctl. M_WAIT is now deprecated but still defined for the next little while. * Fix a typo in a comment in mbuf.h * Fix some code that was actually passing the mbuf subsystem's M_WAIT to malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the value of the M_WAIT flag, this could have became a big problem.
* A last minute brucification resulted in syntax errors in the previous commit.phk2000-12-201-4/+4
|
* Replace logwakeup() with "int msgbuftrigger". There is littlephk2000-12-203-64/+113
| | | | | | | | | | | point in calling a function just to set a flag. Keep better track of the syslog FAC/PRI code and try to DTRT if they mingle. Log all writes to /dev/console to syslog with <console.info> priority. The formatting is not preserved, there is no robust, way of doing it. (Ideas with patches welcome).
* Fix another sched_sihand -> sched_swi in a KTR trace message.jhb2000-12-181-1/+1
|
* Whitespace. Fix a comment block and an if statement that were widerjake2000-12-181-7/+9
| | | | than 80 characters.
* Fix a typo that allowed signals caused by traps to be deliveredmarcel2000-12-161-1/+1
| | | | | | | to the process when said signal is masked. PR: 23457 Submitted by: Yasuhiko Watanabe <yasu@mrit.mei.co.jp>
* Delay waking up processes select'ing on the log device directly fromjhb2000-12-151-0/+29
| | | | | | | | | | the kernel console. Instead, change logwakeup() to set a flag in the softc. A callout then wakes up every so often and wakes up any processes selecting on /dev/log (such as syslogd) if the flag is set. By default this callout fires 5 times a second, but that can be adjusted by the sysctl kern.log_wakeups_per_second. Reviewed by: phk
* Stick the kthread API in a kthread_* namespace, and the specialized kprocjhb2000-12-155-13/+13
| | | | | | functions in a kproc_* namespace. Reviewed by: -arch
* Don't clone impossible unit numbers for disks.phk2000-12-151-0/+2
|
* Add in MI implementations of the KTR trace buffer ddb commands. Thejhb2000-12-151-0/+97
| | | | | | | | | | | | | | | commands have also been slightly updated as follows: - Use ktr_idx to find the newest entry rather than walking the buffer comparing timespecs. Timespecs are not always unique after the change to use getnanotime(9). - Add a new verbose setting. When the verbose setting is on, then the timestamp is printed with each message. If KTR_EXTEND is on, then the filename and line number are output as well. By default this option is off. It can be turned on with the 'v' modifier passed to the 'tbuf' and 'tall' commands. For the 'tnext' command, the 'v' modifier toggles the verbose mode. - Only display the cpu number for each message on SMP systems. - Don't display anything for an empty entry that hasn't been used yet.
* - Add a new flag MTX_QUIET that can be passed to the various mtx_*jhb2000-12-133-120/+195
| | | | | | | | | | functions. If this flag is set, then no KTR log messages are issued. This is useful for blocking excessive logging, such as with the internal mutex used by the witness code. - Use MTX_QUIET on all of the mtx_enter/exit operations on the internal mutex used by the witness code. - If we are in a panic, don't do witness checks in witness_enter(), witness_exit(), and witness_try_enter(), just return.
* String buffer APIdes2000-12-131-0/+271
|
* If we fail to emulate a vm86 trap in kernel mode, then we usejhb2000-12-131-0/+1
| | | | | | vm86_trap() to return to the calling program directly. vm86_trap() doesn't return, thus it was never returning to trap() to release Giant. Thus, release Giant before calling vm86_trap().
* Use proper mutex locking when calling setrunnable from speedup_syncer().mckusick2000-12-132-6/+4
| | | | Submitted by: Tor.Egge@fast.no
* - Change the allproc_lock to use a macro, ALLPROC_LOCK(how), insteadjake2000-12-1311-34/+35
| | | | | | | | of explicit calls to lockmgr. Also provides macros for the flags pased to specify shared, exclusive or release which map to the lockmgr flags. This is so that the use of lockmgr can be easily replaced with optimized reader-writer locks. - Add some locking that I missed the first time.
* only include sys/proc.h oncemjacob2000-12-121-1/+0
|
* Include sys/proc.h so this compiles [on the Alpha].obrien2000-12-121-0/+1
|
* We reference curproc, ergo need <sys/proc.h>mjacob2000-12-121-0/+1
|
* Change the proc information returned from the kernel so that itmckusick2000-12-123-54/+109
| | | | | | | | | | | | no longer contains kernel specific data structures, but rather only scalar values and structures that are already part of the kernel/user interface, specifically rusage and rtprio. It no longer contains proc, session, pcred, ucred, procsig, vmspace, pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If any of these changed in size, ps, w, fstat, gcore, systat, and top would all stop working. The new structure has over 200 bytes of unassigned space for future values to be added, yet is nearly 100 bytes smaller per entry than the structure that it replaced.
* - Convert the per-eventhandler list mutex to a lockmgr lock so that it canjhb2000-12-121-11/+20
| | | | | | | | | | | | be safely held across an eventhandler function call. - Fix an instance of the head of an eventhandler list being read without the lock being held. - Break down and use a SYSINIT at the new SI_SUB_EVENTHANDLER to initialize the eventhandler global mutex and the eventhandler list of lists rather than using a non-MP safe initialization during the first call to eventhandler_register(). - Add in a KASSERT() to eventhandler_register() to ensure that we don't try to register an eventhandler before things have been initialized.
* - Add code to detect if a system call returns with locks other than Giantjake2000-12-124-3/+28
| | | | | | | | | held and panic if so (conditional on witness). - Change witness_list to return the number of locks held so this is easier. - Add kern/syscalls.c to the kernel build if witness is defined so that the panic message can contain the name of the offending system call. - Add assertions that Giant and sched_lock are not held when returning from a system call, which were missing for alpha and ia64.
* - Don't bother taking a trace message if we have panic'd since doing sojhb2000-12-121-1/+3
| | | | | | | | | | | can lead to further panics. - Call getnanotime() instead of nanotime() for the timestamp. nanotime() is more precise, but it also calls into the timer code, which results in mutex operations on the i386 arch. If KTR_LOCK is turned on, then ktr_tracepoint() recurses on itself until it exhausts the kernel stack. Eventually this should change to use get_cyclecount() instead, but that can't happen if get_cyclecount() is calling nanotime() instead of getnanotime().
* Oops, the witness mutex is a spin lock, so use MTX_SPIN in the call tojhb2000-12-123-3/+3
| | | | | mtx_init(). Since the witness code ignores its internal mutex, this doesn't result in any functional change.
* Add `_PATH_DEVZERO'.obrien2000-12-092-2/+4
| | | | Use _PATH_* where where possible.
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-0826-89/+50
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Staticize some malloc M_ instances.phk2000-12-0812-12/+12
|
* Kill some bogus "register" keywords.phk2000-12-081-31/+11
| | | | Go Ansi on the functions.
* Only call bwillwrite() for vnodes. Do not penalize devices or pipes.dillon2000-12-071-1/+2
|
* Hide intrstate in the #ifdef where it belongs.phk2000-12-071-1/+1
|
* Add necessary bwillwrite() in writev() entry point.dillon2000-12-061-0/+1
| | | | | | Deal with excessive dirty buffers when msync() syncs non-contiguous dirty buffers by checking for the case in UFS *before* checking for clusterability.
* Untangle vfsinit() a bit. Use seperate sysinit functions rather thanpeter2000-12-065-30/+29
| | | | having a super-function calling bits all over the place.
* Simplify this a bit so that it doesn't have to generate silly redundantpeter2000-12-061-14/+3
| | | | | | __P() prototypes when an ansi-style static inline is a prototype already. Since vnode_if.[ch] are generated on the fly, there are no CVS diffs to mess up.
* This is kind of a nasty hack, but it appears to solve the Compaq DL360peter2000-12-061-2/+13
| | | | | | | | SMP problem. Compaq, in their infinite wisdom, forgot to put the IO apic intpin #0 connection to the 8259 PIC into the mptable. This hack is to look and see if intpin #0 has *no* table entry and adds a fake ExtInt entry for the remap routines to use. isa/clock.c will still test the interrupts. This entry is only ever used on an already broken system.
* Pass RFSTOPPED to fork1() in kthread_create() to avoid a race conditionjhb2000-12-061-1/+9
| | | | | | | | | | where fork1() could put the process on the run queue where it could be snatched up by another CPU before kthread_create() had set the proper fork handler. Instead, we put the new kthread on the runqueue after its fork handler has been sent. Noticed by: jake Looked over by: peter
* Add in #include of <sys/lock.h> since it was axed from <sys/proc.h>.jhb2000-12-061-0/+1
| | | | | Noticed by: Wesley Morgan <morganw@chemikals.org> Pointy hat to: me
* Add forgotten SYSCALL_MODULE_HELPER() for msgsys() syscall.alfred2000-12-051-0/+1
| | | | Discovered by: Valentin Chopov <valentin@valcho.net>
OpenPOWER on IntegriCloud