summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* - Split the struct kse into struct upcall and struct kse. struct kse willjeff2003-02-1710-1236/+1358
| | | | | | | soon be visible only to schedulers. This greatly simplifies much the KSE code. Submitted by: davidxu
* - Move ke_sticks, ke_iticks, ke_uticks, ke_uu, ke_su, and ke_iu back intojeff2003-02-173-79/+67
| | | | | | | the proc. These counters are only examined through calcru. Submitted by: davidxu Tested on: x86, alpha, UP/SMP
* Fix logic in loop so it actually executes.alfred2003-02-161-1/+1
| | | | Pointed out by: fjoe
* Remove #include <sys/dkstat.h>phk2003-02-162-2/+0
|
* Move the tty related statistics counters to live with the tty code.phk2003-02-162-5/+5
|
* - Introduce a new function bremfreel() that does a bremfree with the bufjeff2003-02-161-8/+14
| | | | | | | | | queue lock already held. - In getblk() and flushbufqueues() use bremfreel() while we still have the buf queue lock held to keep the lists consistent. - Add LK_NOWAIT to two cases where we're essentially asserting that the bufs are not locked while acquiring the locks. This will make sure that we get the appropriate panic() and not another one for sleeping with a lock held.
* - Add a WITNESS_SLEEP() for the appropriate cases in lockmgr().jeff2003-02-161-0/+7
|
* prevent overflow in shminfo.shmmaxalfred2003-02-161-1/+5
|
* Remove extraneous FILEDESC_LOCK around atomic read.hsu2003-02-162-4/+0
|
* - Update a couple of comments to make sense with what today's code isarr2003-02-151-6/+12
| | | | doing (stale comments make arr something something ;)).
* Avoid file lock leakage when linuxthreads port or rfork is used:tegge2003-02-152-15/+58
| | | | | | | | | | | | - Mark the process leader as having an advisory lock - Check if process leader is marked as having advisory lock when closing file - Check that file is still open after lock has been obtained - Don't allow file descriptor table sharing between processes with different leaders PR: 10265 Reviewed by: alfred
* - Remove old comment for PURGE() as it no longer exists and implied itarr2003-02-151-2/+4
| | | | | | | was a comment to cache_zap(). - Add a comment to quickly state what cache_zap() does. Reviewed by: phk, mux
* Acquire Giant around calls to kern_sigaction() in sigaction(),tjr2003-02-151-17/+9
| | | | | | | freebsd4_sigaction() and osigaction() instead of around the whole body of those functions. They now no longer hold Giant around calls to copyin() and copyout(), and it is slightly more obvious what Giant is protecting.
* osigpending() no longer needs Giant, for the same reason sigpending()tjr2003-02-151-3/+0
| | | | does not.
* All uses of p_siglist are protected by the proc lock now, so there'stjr2003-02-151-6/+1
| | | | no need to acquire Giant in sigpending() anymore.
* Do not allow kqueues to be passed via unix domain sockets.alfred2003-02-156-5/+14
|
* Fix LOR with PROC/filedesc. Introduce fdesc_mtx that will be used as aalfred2003-02-154-6/+16
| | | | | | barrier between free'ing filedesc structures. Basically if you want to access another process's filedesc, you want to hold this mutex over the entire operation.
* Make m_getm() always return the top of the newly allocated chain, asbmilekic2003-02-142-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | opposed to returning the top of the old chain when there was one and the top of the newly allocated chain if there was no old chain. Actually, it should be noted that prior to this fix, although the comment above m_getm() advertised that m_getm() would return the top of the old chain (if an old chain was being passed in) it actually [wrongly] was returning the tail mbuf in the old chain instead. This is a bug but since the one use of m_getm() in the tree luckily did not depend on the behavior, it happened to work out without notice. Harti Brandt pointed out that the advertised behavior was actually not the real behavior and so this change makes m_getm() ALWAYS return the newly allocated chain (and fixes the comment). This is less confusing and is the best course of action as then the caller is always able to have both a reference to the top of the original chain (because it's passing it in in the call) and a reference to the newly attached chain. Although the API is slightly modified, I don't think that any third-party code uses m_getm() and if it does, it surely can't be working properly because the old behavior was bogus. API bug pointed out by: Harti Brandt <brandt@fokus.fraunhofer.de>
* Style nit.des2003-02-141-4/+2
|
* KASSERT format string does not need newline terminationalfred2003-02-141-2/+2
|
* Add kasserts to catch bad API usage.alfred2003-02-141-0/+6
| | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* Fix crash dumps on ata and scsi.alfred2003-02-141-1/+2
| | | | | | | | | | | To fix scsi, don't wait for ithreads if we're dumping, it makes the debugger sad. To fix ata, use what appears to be a polling method if we're dumping, I stole this from tmm but added code to ensure that this change is only in effect while dumping. Tested by: des
* style.alfred2003-02-141-8/+20
|
* Print a backtrace in case we tsleep from inside of DDB.alfred2003-02-141-0/+1
|
* Use atomic ops to update amountpipekva. Amountpipekva represents thealc2003-02-131-5/+8
| | | | | total kernel virtual address space used by all pipes. It is, thus, outside the scope of any individual pipe lock.
* It seems the extra precautions are no longer needed.des2003-02-131-2/+0
|
* Add an XXX comment noting that getrusage() accesses p_stats->p_rutjr2003-02-131-0/+1
| | | | and p_stats->p_cru without holding the appropriate locks.
* Add a 'debug.witness_trace' sysctl (and tunable) when DDB is present.peter2003-02-131-2/+16
| | | | This causes LOR and could-sleep messages to come with a stack trace.
* Print "Stack backtrace:" right before dumping the backtrace. We cannotpeter2003-02-131-1/+2
| | | | expect end users to automatically recognize a stack trace for what it is.
* Implement rman_get_deviceimp2003-02-121-0/+6
| | | | | | # I though this was alredy implemented Pointy hat on my head shown by: peter
* Don't lock FILEDESC under PROC.alfred2003-02-111-2/+1
| | | | | | The locking here needs to be revisited, but this ought to get rid of the LOR messages that people are complaining about for now. I imagine either I or someone else interested with smp will eventually clear this up.
* - Add a comment about a race that will happen without Giant.jeff2003-02-101-0/+1
|
* - Unlock the nblock after the loop in bwillwrite().jeff2003-02-101-1/+1
|
* - Enable STRICT_RESCHED until code that dynamically decides on reschedjeff2003-02-101-0/+2
| | | | strictness based on the current workload is finished.
* - Add a new variable 'kg_runtime' that tracks the amount of time we've run.jeff2003-02-101-25/+66
| | | | | | | | | - Use the ratio of kg_runtime / kg_slptime to determine our dynamic priority. - Scale kg_runtime and kg_slptime back when the sum of the two exceeds SCHED_SLP_RUN_MAX. This allows us to slowly forget old behavior. - Scale back the runtime and slptime in fork so that the new process has the same ratio but much less accumulated time. This causes new behavior to be noticed more quickly.
* Lock the proc around accessing p_siglist in ttycheckoutq() in thetjr2003-02-101-3/+14
| | | | unused wait != 0 case.
* - In getnewbuf() unlock the bq lock prior to sleeping when we're out ofjeff2003-02-101-0/+1
| | | | | | buffers. Submitted by: tegge
* Remove mtx_lock_giant from functions which are mp-safe.jake2003-02-101-9/+0
|
* - Correct another atomic op.jeff2003-02-091-1/+2
| | | | Spotted by: alc
* - Claim we're 'fsync' and not 'spec_fsync' in vop_stdfsync.jeff2003-02-091-1/+1
|
* - Move some code out from #ifdef INVARIANTS.jeff2003-02-091-2/+0
|
* - Update a printf format for b_flags.jeff2003-02-091-1/+1
|
* - Cleanup unlocked accesses to buf flags by introducing a new b_vflag memberjeff2003-02-092-2/+93
| | | | | | | | | | that is protected by the vnode lock. - Move B_SCANNED into b_vflags and call it BV_SCANNED. - Create a vop_stdfsync() modeled after spec's sync. - Replace spec_fsync, msdos_fsync, and hpfs_fsync with the stdfsync and some fs specific processing. This gives all of these filesystems proper behavior wrt MNT_WAIT/NOWAIT and the use of the B_SCANNED flag. - Annotate the locking in buf.h
* - spell add 'add' and not 'subtract' in an atomic op.jeff2003-02-091-1/+1
| | | | | Spotted by: alc Pointy hat to: jeff
* - Lock down the buffer cache's infrastructure code. This includes locks onjeff2003-02-091-61/+154
| | | | | | | buf lists, synchronization variables, and atomic ops for the counters. This change does not remove giant from any code although some pushdown may be possible. - In vfs_bio_awrite() don't access buf fields without the buf lock.
* A little infrastructure, preceding some upcoming changesjulian2003-02-083-25/+66
| | | | | | | to the profiling and statistics code. Submitted by: DavidXu@ Reviewed by: peter@
* Remove vestiges of no longer needed unp_rvnode field.hsu2003-02-061-1/+0
| | | | Approved by: phk (who originally added it in rev 1.8 of unpcb.h)
* The lockmanager has to keep track of locks per thread, not per process.julian2003-02-051-19/+19
| | | | | Submitted by: david Xu (davidxu@) Reviewed by: jhb@
* Correct grammatical error in previous commit.des2003-02-041-1/+1
|
* Extra precautions before trying to start init(8).des2003-02-041-0/+2
|
OpenPOWER on IntegriCloud