summaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* o In vm_map_entry_create(), call uma_zalloc() with M_NOWAIT on system maps.Alan Cox2002-06-101-5/+6
| | | | | | | | | | Submitted by: tegge o Eliminate the "!mapentzone" check from vm_map_entry_create() and vm_map_entry_dispose(). Reviewed by: tegge o Fix white-space usage in vm_map_entry_create(). Notes: svn path=/head/; revision=98083
* Correct the logic for determining whether the per-CPU locks needIan Dowse2002-06-101-1/+1
| | | | | | | | | | to be destroyed. This fixes a problem where destroying a UMA zone would fail to destroy all zone mutexes. Reviewed by: jeff Notes: svn path=/head/; revision=98075
* o Add vm_map_wire() for wiring contiguous regions of either kernelAlan Cox2002-06-091-1/+159
| | | | | | | | | | | | | | or user vm_maps. This implementation has two key benefits when compared to vm_map_{user_,}pageable(): (1) it avoids a race condition through the use of "in-transition" vm_map entries and (2) it eliminates lock recursion on the vm_map. Note: there is still an error case that requires clean up. Reviewed by: tegge Notes: svn path=/head/; revision=98071
* Fix driver to re-enable sound output on AD1816 based cards caused by anHellmuth Michaelis2002-06-091-0/+4
| | | | | | | | | | | obviously bogous return value of ad1816chan_setformat(). PR: 37932 Submitted by: Martin Kaeske <Martin.Kaeske@Stud.TU-Ilmenau.DE> Reviewed by: hm MFC after: 10 days Notes: svn path=/head/; revision=98068
* Improve some on the naming.Poul-Henning Kamp2002-06-0912-53/+55
| | | | | | | Submitted by: iedowse Notes: svn path=/head/; revision=98066
* if you have taken the mbuf out of the message object, then if you passJulian Elischer2002-06-091-1/+3
| | | | | | | the object to someone else, you need to put the mbuf back into it first.. Notes: svn path=/head/; revision=98063
* Fix bug which has been there since rev 1.1 where && was used instead of &.Jeffrey Hsu2002-06-091-1/+1
| | | | Notes: svn path=/head/; revision=98060
* Renamed the idempotency identifier to match the file name. Cleaned upBruce Evans2002-06-091-15/+14
| | | | | | | indentation and comments. Notes: svn path=/head/; revision=98059
* Fix a '<<' that should have been a '>>' in the 48bit case.Søren Schmidt2002-06-081-1/+1
| | | | | | | | Fortunately we only have had 32bit block counts until recently, and no 2TB disks :) Notes: svn path=/head/; revision=98055
* o Simplify vm_map_unwire() by merging the second and third passesAlan Cox2002-06-081-17/+11
| | | | | | | over the caller-specified region. Notes: svn path=/head/; revision=98052
* Add code to drop to ddb when a process gets a fatal signal that usuallyJake Burkholder2002-06-081-0/+8
| | | | | | | | suggests kernel bugs (4, 10, 11). Add a sysctl debug.debugger_on_signal which turns this on and off, default off. Notes: svn path=/head/; revision=98037
* o Remove an unnecessary call to vm_map_wakeup() from vm_map_unwire().Alan Cox2002-06-082-6/+17
| | | | | | | | | | | o Add a stub for vm_map_wire(). Note: the description of the previous commit had an error. The in- transition flag actually blocks the deallocation of a vm_map_entry by vm_map_delete() and vm_map_simplify_entry(). Notes: svn path=/head/; revision=98036
* Re-enable SMP by default.Jake Burkholder2002-06-081-1/+1
| | | | Notes: svn path=/head/; revision=98034
* Remove test code.Jake Burkholder2002-06-084-33/+0
| | | | Notes: svn path=/head/; revision=98033
* Remove code from trap which is handled in userland now.Jake Burkholder2002-06-084-29/+5
| | | | Notes: svn path=/head/; revision=98032
* Fix bizarre SMP problems. The secondary cpus sometimes start up with junkJake Burkholder2002-06-085-1/+51
| | | | | | | | | in their tlb which the prom doesn't clear out, so we have to do so manually before mapping the kernel page table or the cpu can hang due various conditions which cause undefined behaviour from the tlb. Notes: svn path=/head/; revision=98031
* If we boot verbose, then print out 'interesting' CAM errors that otherwiseMatt Jacob2002-06-071-5/+65
| | | | | | | would hide problems (like Selection Timeout). Notes: svn path=/head/; revision=98026
* o Add vm_map_unwire() for unwiring contiguous regions of either kernelAlan Cox2002-06-072-1/+167
| | | | | | | | | | | | | | | | | | or user vm_maps. In accordance with the standards for munlock(2), and in contrast to vm_map_user_pageable(), this implementation does not allow holes in the specified region. This implementation uses the "in transition" flag described below. o Introduce a new flag, "in transition," to the vm_map_entry. Eventually, vm_map_delete() and vm_map_simplify_entry() will respect this flag by deallocating in-transition vm_map_entrys, allowing the vm_map lock to be safely released in vm_map_unwire() and (the forthcoming) vm_map_wire(). o Modify vm_map_simplify_entry() to respect the in-transition flag. In collaboration with: tegge Notes: svn path=/head/; revision=98022
* Comment out options SMP for now until I figure out what's going on.Jake Burkholder2002-06-071-1/+1
| | | | Notes: svn path=/head/; revision=98019
* 0 is not an invalid interrupt in the PCI world (just in the ia32Warner Losh2002-06-071-2/+4
| | | | | | | | | world), do not treat it as such. This fixes the alpha boot problem. Reviewed by: drew, des Notes: svn path=/head/; revision=98017
* Renamed the idempotency identifier to match the file name.Bruce Evans2002-06-071-3/+3
| | | | Notes: svn path=/head/; revision=98016
* According to Bruce, this file shouldn't have comments to describe whatJohn Baldwin2002-06-071-1/+1
| | | | | | | | | | | options do. Comments should be in NOTES and having the comments in two places usually means that one place will just bitrot. Thus, remove the comment for KTRACE_REQUEST_POOL from the previous revision. Requested by: bde Notes: svn path=/head/; revision=98015
* Uncomment some bits that we now need.Benno Rice2002-06-072-12/+12
| | | | Notes: svn path=/head/; revision=98014
* Fix up the DMA buffer allocation call.Benno Rice2002-06-071-1/+2
| | | | Notes: svn path=/head/; revision=98013
* Commit changes that happened in IPFilter versions 3.4.27 - 3.4.28Darren Reed2002-06-0710-24/+67
| | | | Notes: svn path=/head/; revision=98004
* - Fixup / remove obsolete comments.John Baldwin2002-06-077-195/+139
| | | | | | | | | | | | | | - ktrace no longer requires Giant so do ktrace syscall events before and after acquiring and releasing Giant, respectively. - For i386, ia32 syscalls on ia64, powerpc, and sparc64, get rid of the goto bad hack and instead use the model on ia64 and alpha were we skip the actual syscall invocation if error != 0. This fixes a bug where if we the copyin() of the arguments failed for a syscall that was not marked MP safe, we would try to release Giant when we had not acquired it. Notes: svn path=/head/; revision=98001
* We no longer need to acqure Giant in ast() for ktrpsig() in postsig() nowJohn Baldwin2002-06-071-2/+0
| | | | | | | that ktrace no longer needs Giant. Notes: svn path=/head/; revision=98000
* - trapsignal() no longer needs to acquire Giant for ktrpsig().John Baldwin2002-06-071-7/+5
| | | | | | | - Catch up to new ktrace API. Notes: svn path=/head/; revision=97999
* - Proper locking for p_tracep and p_traceflag.John Baldwin2002-06-071-7/+7
| | | | | | | - Catch up to new ktrace API. Notes: svn path=/head/; revision=97998
* Properly lock accesses to p_tracep and p_traceflag. Also make a fewJohn Baldwin2002-06-073-3/+27
| | | | | | | ktrace-only things #ifdef KTRACE that were not before. Notes: svn path=/head/; revision=97997
* - Catch up to new ktrace API.John Baldwin2002-06-072-28/+23
| | | | | | | - ktrace trace points in msleep() and cv_wait() no longer need Giant. Notes: svn path=/head/; revision=97995
* Catch up to changes in ktrace API.John Baldwin2002-06-074-22/+23
| | | | Notes: svn path=/head/; revision=97994
* Overhaul the ktrace subsystem a bit. For the most part, the actual vnodeJohn Baldwin2002-06-074-239/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operations to dump a ktrace event out to an output file are now handled asychronously by a ktrace worker thread. This enables most ktrace events to not need Giant once p_tracep and p_traceflag are suitably protected by the new ktrace_lock. There is a single todo list of pending ktrace requests. The various ktrace tracepoints allocate a ktrace request object and tack it onto the end of the queue. The ktrace kernel thread grabs requests off the head of the queue and processes them using the trace vnode and credentials of the thread triggering the event. Since we cannot assume that the user memory referenced when doing a ktrgenio() will be valid and since we can't access it from the ktrace worker thread without a bit of hassle anyways, ktrgenio() requests are still handled synchronously. However, in order to ensure that the requests from a given thread still maintain relative order to one another, when a synchronous ktrace event (such as a genio event) is triggered, we still put the request object on the todo list to synchronize with the worker thread. The original thread blocks atomically with putting the item on the queue. When the worker thread comes across an asynchronous request, it wakes up the original thread and then blocks to ensure it doesn't manage to write a later event before the original thread has a chance to write out the synchronous event. When the original thread wakes up, it writes out the synchronous using its own context and then finally wakes the worker thread back up. Yuck. The sychronous events aren't pretty but they do work. Since ktrace events can be triggered in fairly low-level areas (msleep() and cv_wait() for example) the ktrace code is designed to use very few locks when posting an event (currently just the ktrace_mtx lock and the vnode interlock to bump the refcoun on the trace vnode). This also means that we can't allocate a ktrace request object when an event is triggered. Instead, ktrace request objects are allocated from a pre-allocated pool and returned to the pool after a request is serviced. The size of this pool defaults to 100 objects, which is about 13k on an i386 kernel. The size of the pool can be adjusted at compile time via the KTRACE_REQUEST_POOL kernel option, at boot time via the kern.ktrace_request_pool loader tunable, or at runtime via the kern.ktrace_request_pool sysctl. If the pool of request objects is exhausted, then a warning message is printed to the console. The message is rate-limited in that it is only printed once until the size of the pool is adjusted via the sysctl. I have tested all kernel traces but have not tested user traces submitted by utrace(2), though they should work fine in theory. Since a ktrace request has several properties (content of event, trace vnode, details of originating process, credentials for I/O, etc.), I chose to drop the first argument to the various ktrfoo() functions. Currently the functions just assume the event is posted from curthread. If there is a great desire to do so, I suppose I could instead put back the first argument but this time make it a thread pointer instead of a vnode pointer. Also, KTRPOINT() now takes a thread as its first argument instead of a process. This is because the check for a recursive ktrace event is now per-thread instead of process-wide. Tested on: i386 Compiles on: sparc64, alpha Notes: svn path=/head/; revision=97993
* Use a larger data type to prevent counters wrapping so quickly.Matthew N. Dodd2002-06-072-14/+14
| | | | | | | Silence a warning. Notes: svn path=/head/; revision=97990
* Recognize Adaptec ANA-5910/30/40[A] boards.Matthew N. Dodd2002-06-073-19/+65
| | | | | | | | | Read the MAC address from Adaptec boards correctly. Bits borrowed from sys/pci/if_en_pci.c. Notes: svn path=/head/; revision=97988
* Add a new SYSINIT subsystem for KTRACE.John Baldwin2002-06-071-0/+1
| | | | Notes: svn path=/head/; revision=97987
* - Add a per-thread member 'td_inktrace' to be used by ktrace to detectJohn Baldwin2002-06-071-2/+4
| | | | | | | | | | when a thread is in the ktrace subsystem to avoid ktrace'ing internal ktrace events. - Update the locking notes for p_traceflag and p_tracep taking into account the new ktrace_lock mutex. Notes: svn path=/head/; revision=97986
* 'device hea' is no longer broken.Matthew N. Dodd2002-06-072-4/+4
| | | | | | | Add 'nowerror' to a few 'hea' files to ignore warnings on volatiles. Notes: svn path=/head/; revision=97983
* Move some code around.Matthew N. Dodd2002-06-074-16/+18
| | | | | | | Minor whitespace changes. Notes: svn path=/head/; revision=97982
* Work around a bug in the Linux version of ski, that's specific toMarcel Moolenaar2002-06-061-0/+11
| | | | | | | | | | SSC_GET_RTC. This fixes the panic seen shortly after mounting the root file system. Thanks to: "K.Sumitani" <ksumitani@mui.biglobe.ne.jp> Notes: svn path=/head/; revision=97969
* Change the all locks list from a STAILQ to a TAILQ. This bloats structJohn Baldwin2002-06-062-7/+7
| | | | | | | | | | | | | lock_object by another pointer (though all of lock_object should be conditional on LOCK_DEBUG anyways) in exchange for an O(1) TAILQ_REMOVE() in witness_destroy() (called for every mtx_destroy() and sx_destroy()) instead of an O(n) STAILQ_REMOVE. Since WITNESS is so dog slow as it is, the speed-up is worth the space cost. Suggested by: iedowse Notes: svn path=/head/; revision=97963
* Fix a typo in my recently added comment: s/beleived/believed/Semen Ustimenko2002-06-061-1/+1
| | | | | | | Submitted by: keramida Notes: svn path=/head/; revision=97962
* s/!SIGNOTEMPY/SIGISEMPTY/Chad David2002-06-061-1/+1
| | | | | | | Reviewed by: marcel, jhb, alfred Notes: svn path=/head/; revision=97950
* Handle "dead" witnesses better in the situation of several short term locksJohn Baldwin2002-06-061-13/+11
| | | | | | | | | | | | | | | | | being created and destroyed without a single long-term one around to ensure the witness associated with that group of locks stays alive. The pipe mutexes are an example of this group. For a dead witness we no longer clear the witness name. Instead, when looking up the witness for a lock, if a dead witness' (a witness with a refcount of 0) w_name pointer is identical to the witness name of the lock then we revive that witness instead of using a new witness for the lock. This results in far fewer dead witness objects and also better preserves locking orders over the long term resulting in more correct lock order checking. Note that we can't ever derefence w_name of a dead witness since we don't know if the string it is pointing to has been free()'d or kldunload()'d out from under us. Notes: svn path=/head/; revision=97948
* fix typo in _SYS_SYSPROTO_H_ case: s/mlockall_args/munlockall_argsAlfred Perlstein2002-06-061-1/+1
| | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Notes: svn path=/head/; revision=97947
* Gratuitous whitespace cleanup.Dag-Erling Smørgrav2002-06-065-88/+88
| | | | Notes: svn path=/head/; revision=97940
* Hook up the ahd driver.Justin T. Gibbs2002-06-0612-27/+37
| | | | Notes: svn path=/head/; revision=97937
* Remove one more multi-line string literal.Justin T. Gibbs2002-06-061-5/+5
| | | | Notes: svn path=/head/; revision=97936
* Move some sysctls from the debug tree to the vfs tree.Dag-Erling Smørgrav2002-06-061-3/+3
| | | | Notes: svn path=/head/; revision=97935
* Gratuitous whitespace cleanup.Dag-Erling Smørgrav2002-06-061-28/+27
| | | | Notes: svn path=/head/; revision=97934