summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Blow away the v_specmountpoint define, replacing it with what it waseivind2000-10-092-4/+4
| | | | defined as (rdev->si_mountpoint)
* Do not call lockdestroy() for v_vnlock, which may point to a lock in ajasone2000-10-062-8/+2
| | | | | | deeper vfs stacking layer. Submitted by: bp
* Correct a warning where the r_debug_state() dummy function used to triggerjhb2000-10-062-6/+12
| | | | | | a breakpoint in the kernel didn't use the proper argument list. To avoid having to include the userland link.h header everyhwere that sys/linker.h is used, make r_debug_state() a static function in link_elf.c as well.
* - Change fast interrupts on x86 to push a full interrupt frame and tojhb2000-10-064-33/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | return through doreti to handle ast's. This is necessary for the clock interrupts to work properly. - Change the clock interrupts on the x86 to be fast instead of threaded. This is needed because both hardclock() and statclock() need to run in the context of the current process, not in a separate thread context. - Kill the prevproc hack as it is no longer needed. - We really need Giant when we call psignal(), but we don't want to block during the clock interrupt. Instead, use two p_flag's in the proc struct to mark the current process as having a pending SIGVTALRM or a SIGPROF and let them be delivered during ast() when hardclock() has finished running. - Remove CLKF_BASEPRI, which was #ifdef'd out on the x86 anyways. It was broken on the x86 if it was turned on since cpl is gone. It's only use was to bogusly run softclock() directly during hardclock() rather than scheduling an SWI. - Remove the COM_LOCK simplelock and replace it with a clock_lock spin mutex. Since the spin mutex already handles disabling/restoring interrupts appropriately, this also lets us axe all the *_intr() fu. - Back out the hacks in the APIC_IO x86 cpu_initclocks() code to use temporary fast interrupts for the APIC trial. - Add two new process flags P_ALRMPEND and P_PROFPEND to mark the pending signals in hardclock() that are to be delivered in ast(). Submitted by: jakeb (making statclock safe in a fast interrupt) Submitted by: cp (concept of delaying signals until ast())
* Various whitespace cleanups after the SMPng commit, which jumbled thingsjhb2000-10-061-19/+19
| | | | around a bit in the trap handling code.
* Don't treat a kernel stack fault the same as a general protect fault orjhb2000-10-061-0/+3
| | | | a segment not present fault in the non-vm86 case.
* - Heavyweight interrupt threads on the alpha for device I/O interrupts.jhb2000-10-053-20/+227
| | | | | | | | | | | - Make softinterrupts (SWI's) almost completely MI, and divorce them completely from the x86 hardware interrupt code. - The ihandlers array is now gone. Instead, there is a MI shandlers array that just contains SWI handlers. - Most of the former machine/ipl.h files have moved to a new sys/ipl.h. - Stub out all the spl*() functions on all architectures. Submitted by: dfr
* Style fixes based on comments by bdeeivind2000-10-052-40/+62
|
* Add a workaround for statically linked kernels.dfr2000-10-041-0/+6
|
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-0411-191/+239
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Move KASSERTs which checks value of v_usecount after vnode locking, sobp2000-10-022-4/+8
| | | | it will not produce wrong alarms.
* Treat %X the same as %x (not entirely correct, but close enough).msmith2000-10-021-0/+1
|
* Big mbuf subsystem diff #1: incorporate mutexes and fix things up somewhatbmilekic2000-09-301-254/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to accomodate the changes. Here's a list of things that have changed (I may have left out a few); for a relatively complete list, see http://people.freebsd.org/~bmilekic/mtx_journal * Remove old (once useful) mcluster code for MCLBYTES > PAGE_SIZE which nobody uses anymore. It was great while it lasted, but now we're moving onto bigger and better things (Approved by: wollman). * Practically re-wrote the allocation macros in sys/sys/mbuf.h to accomodate new allocations which grab the necessary lock. * Make sure that necessary mbstat variables are manipulated with corresponding atomic() routines. * Changed the "wait" routines, cleaned it up, made one routine that does the job. * Generalized MWAKEUP() macro. Got rid of m_retry and m_retryhdr, as they are now included in the generalized "wait" routines. * Sleep routines now use msleep(). * Free lists have locks. * etc... probably other stuff I'm missing... Things to look out for and work on later: * find a better way to (dynamically) adjust EXT_COUNTERS * move necessity to recurse on a lock from drain routines by providing lock-free lower-level version of MFREE() (and possibly m_free()?). * checkout include of mutex.h in sys/sys/mbuf.h - probably violating general philosophy here. The code has been reviewed quite a bit, but problems may arise... please, don't panic! Send me Emails: bmilekic@freebsd.org Reviewed by: jlemon, cp, alfred, others?
* Add ia64 support.dfr2000-09-291-1/+1
|
* Don't support dynamic linking on ia64 for now - the tools can't cope.dfr2000-09-292-0/+12
|
* Change the conditionaal so that we only build this on i386 instead ofdfr2000-09-291-1/+1
| | | | trying to build it on all non-alpha arches.
* Check so_error in filt_so{read|write} in order to detect UDP errors.jlemon2000-09-281-0/+4
| | | | PR: 21601
* Do the right thing if bdevvp is called twice for the same device.mckusick2000-09-272-0/+4
| | | | Obtained from: Poul-Henning Kamp <phk@freebsd.org>
* aio_qphysio: Eliminate one instance of an out-of-range check that isalc2000-09-261-18/+3
| | | | | | | | performed twice. Eliminate initialization that is already performed by _aio_aqueue. aio_physwakeup: Eliminate redundant synchronization that is already performed by bufdone.
* Make size of dynamic loader argument variable to supporttakawata2000-09-261-14/+22
| | | | | | various executable file format. Reviewed by: peter
* Add a lock structure to vnode structure. Previously it was either allocatedbp2000-09-253-60/+28
| | | | | | | | | | | | | | | | | | | separately (nfs, cd9660 etc) or keept as a first element of structure referenced by v_data pointer(ffs). Such organization leads to known problems with stacked filesystems. From this point vop_no*lock*() functions maintain only interlock lock. vop_std*lock*() functions maintain built-in v_lock structure using lockmgr(). vop_sharedlock() is compatible with vop_stdunlock(), but maintains a shared lock on vnode. If filesystem wishes to export lockmgr compatible lock, it can put an address of this lock to v_vnlock field. This indicates that the upper filesystem can take advantage of it and use single lock structure for entire (or part) of stack of vnodes. This field shouldn't be examined or modified by VFS code except for initialization purposes. Reviewed in general by: mckusick
* Add a KASSERT() to catch instances where the mutex that we pass in tojhb2000-09-241-0/+2
| | | | | | msleep() are recursed. Suggested by: cp
* Move MAXCPU from machine/smp.h to machine/param.h to fix breakageps2000-09-231-2/+2
| | | | | with !SMP kernels. Also, replace NCPUS with MAXCPU since they are redundant.
* Don't #include <sys/proc.h>, since machine/mutex.h does it now.jasone2000-09-231-1/+1
|
* Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC,ps2000-09-221-36/+54
| | | | | | NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP. Reviewed by: peter
* o Introduce vn_extattr_rm(), a helper function in the style ofrwatson2000-09-221-0/+23
| | | | | | | | vn_extattr_get() and vn_extattr_set(). vn_extattr_rm() removes the specified extended attribute from a vnode, authorizing the change as the kernel (NULL cred). Obtained from: TrustedBSD Project
* Style fixes:eivind2000-09-222-104/+214
| | | | | | | | | | * Add lots of comments * Convert a couple of assertions to KASSERT() * Minimal whitespace & misapplied {} fixes * Convert #if 0 to #if COMPILING_LINT for code we presently do not support, but want to keep available. Reviewed by: adrian, markm
* Staticize addalias()eivind2000-09-222-2/+4
|
* Create an event (idle_event) which is invoked every time around themsmith2000-09-221-0/+7
| | | | | idle loop. Machine-dependant code can elect to eg. take power-saving actions when this event is invoked.
* Make the EVENTHANDLER mechanism MP-safe. Events can now be invokedmsmith2000-09-221-3/+21
| | | | without holding the Giant lock.
* o Change locking rules for VOP_GETACL() to indicate that vnode locksrwatson2000-09-214-4/+13
| | | | | | | | | | must be held when retrieving ACLs from vnodes. This is required for EA-based UFS ACL implementations. o Update vacl_get_acl() so that it does appropriate vnode locking. o Remove static from M_ACL malloc define so that it is accessible for consumers of ACLs other than in kern_acl.c Obtained from: TrustedBSD Project
* comment vfs_export functions, requested by: eivindalfred2000-09-212-2/+24
|
* Remove unneeded #include that was a remnant of an earlier version oftruckman2000-09-211-1/+0
| | | | | | my uidinfo patch. Found by: phk
* o Add additional comment describing vaccess() behavior.rwatson2000-09-202-0/+14
| | | | | Requested by: eivind Reviewed by: eivind, adrian
* Fully initialize msqids[]. This could lead to ENOSPC and other strangepeter2000-09-191-0/+1
| | | | | | | stuff. PR: 21085 Submitted by: Marcin Cieslak <saper@SYSTEM.PL>
* Rename lminor() to dev2unit(). This function gives a linear unit numberphk2000-09-194-7/+14
| | | | | | | | | | | | which hides the 'hole' in the minor bits. Introduce unit2minor() to do the reverse operation. Fix some some make_dev() calls which didn't use UID_* or GID_* macros. Kill the v_hashchain alias macro, it hides the real relationship. Introduce experimental SI_CHEAPCLONE flag set it on cloned bpfs.
* Add new line character to debugging printf's.ps2000-09-181-4/+4
|
* Initialize 'hints_loaded' to 0.mdodd2000-09-171-1/+1
| | | | This allows static hints to work properly.
* Unpessimized CURSIG(). The fast path through CURSIG() was broken inbde2000-09-171-6/+6
| | | | | | | | | | the 128-bit sigset_t changes by moving conditionally (rarely) executed code to the beginning where it is always executed, and since this code now involves 3 128-bit operations, the pessimization was relatively large. This change speeds up lmbench's pipe latency benchmark by 3.5%. Fixed style bugs in CURSIG().
* Uninlined CURSIG() and unpolluted <sys/signalvar.h>. CURSIG() had becomebde2000-09-171-0/+26
| | | | | | | | | very bloated, first with 128-bit sigset_t's, then with locking in the SMP case, then with locking in all cases. The space bloat was probably also time bloat, partly because the fast path through CURSIG() was pessimized by the sigset_t changes. This change speeds up lmbench's pipe-based latency benchmark by 4% on a Celeron. <sys/signalvar.h> had become very polluted to support the bloat.
* Added used include of <sys/mutex.h> (don't depend on pollution inbde2000-09-174-0/+6
| | | | <sys/signalvar.h>).
* Add new flag PDIRUNLOCK to the component.cn_flags which should be set bybp2000-09-172-9/+25
| | | | | | | | | | | | | | | | | | filesystem lookup() routine if it unlocks parent directory. This flag should be carefully tracked by filesystems if they want to work properly with nullfs and other stacked filesystems. VFS takes advantage of this flag to perform symantically correct usage of vrele() instead of vput() if parent directory already unlocked. If filesystem fails to track this flag then previous codepath in VFS left unchanged. Convert UFS code to set PDIRUNLOCK flag if necessary. Other filesystmes will be changed after some period of testing. Reviewed in general by: mckusick, dillon, adrian Obtained from: NetBSD
* Make LINT compile.phk2000-09-161-2/+0
|
* Turn dkcksum() into an __inline function.phk2000-09-161-17/+0
| | | | Change its type to u_int_16_t.
* Remove some commented out cruft.jhb2000-09-151-7/+0
|
* - Add a new process flag P_NOLOAD that marks a process that should bejhb2000-09-151-0/+1
| | | | | ignored during load average calcuations. - Set this flag for the idle processes and the softinterrupt process.
* Idle processes are always runnable, so let them state at SRUN.jhb2000-09-152-3/+1
|
* Release Giant before starting up init.jhb2000-09-151-1/+3
| | | | Submitted by: jake
* Enforce process limit policy in one place to keep proccnt from divergingtruckman2000-09-141-2/+2
| | | | from reality.
* Remove the mtx_t, witness_t, and witness_blessed_t types. Instead, justjhb2000-09-145-182/+185
| | | | | | use struct mtx, struct witness, and struct witness_blessed. Requested by: bde
OpenPOWER on IntegriCloud