summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Back out fd optimization introduced in revision 1.280 as it appears to becsjp2006-03-181-3/+1
| | | | | | | | | | | | | | | | | | really breaking things. Simple "close(0); dup(fd)" does not return descriptor "0" in some cases. Further, this change also breaks some MAC interactions with mac_execve_will_transition(). Under certain circumstances, fdcheckstd() can be called in execve(2) causing an assertion that checks to make sure that stdin, stdout and stderr reside at indexes 0, 1 and 2 in the process fd table to fail, resulting in a kernel panic when INVARIANTS is on. This should also kill the "dup(2) regression on 6.x" show stopper item on the 6.1-RELEASE TODO list. This is a RELENG_6 candidate. PR: kern/87208 Silence from: des MFC after: 1 week
* Modify UNIX domain sockets to guarantee, and assume, that so_pcb is alwaysrwatson2006-03-171-97/+36
| | | | | | | | | | | | | | defined for an in-use socket. This allows us to eliminate countless tests of whether so_pcb is non-NULL, eliminating dozens of error cases. For now, retain the call to sotryfree() in the uipc_abort() path, but this will eventually move to soabort(). These new assumptions should be largely correct, and will become more so as the socket/pcb reference model is fixed. Removing the notion that so_pcb can be non-NULL is a critical step towards further fine-graining of the UNIX domain socket locking, as the so_pcb reference no longer needs to be protected using locks, instead it is a property of the socket life cycle.
* Correct two vm object reference leaks in error cases.alc2006-03-161-0/+2
| | | | Submitted by: davidxu
* Change soabort() from returning int to returning void, since allrwatson2006-03-163-7/+5
| | | | | | consumers ignore the return value, soabort() is required to succeed, and protocols produce errors here to report multiple freeing of the pcb, which we hope to eliminate.
* Fix a race between file operations and rfork(RFCFDG) by parkingdavidxu2006-03-151-0/+17
| | | | | | | | all other threads at user boundary, the race can crash kernel under stress testing. Reviewed by: jhb MFC after: 3 days
* promote fast ipsec's m_clone routine for public use; it is renamedsam2006-03-151-0/+153
| | | | | | | m_unshare and the caller can now control how mbufs are allocated Reviewed by: andre, luigi, mlaier MFC after: 1 week
* Disable the "cputick increased..." message now that the dust has settled.phk2006-03-151-1/+1
|
* Fix memory leak introduced in previous revision.netchild2006-03-151-3/+3
| | | | Discussed with: phk
* As with socket consumer references (so_count), make sofree() returnrwatson2006-03-151-3/+3
| | | | | without GC'ing the socket if a strong protocol reference to the socket is present (SS_PROTOREF).
* 1. Count last time slice, this intends to fixdavidxu2006-03-142-14/+18
| | | | | | | "calcru: runtime went backwards" bug for threaded process. 2. Add comment about possible logical problem with scheduler. MFC after: 3 days
* spell pdata correctly, we now will only dump maxlen of each mbuf in thejmg2006-03-141-1/+1
| | | | | chain, instead of the entire mbuf... This should probably be reworked so that it prints at max maxlen bytes for the entire chain...
* The mount(8) manpage says: "In case of conflicting options beingru2006-03-131-56/+39
| | | | | | specified, the rightmost option takes effect." Fix code to obey this. This makes e.g. "mount -r /usr" or "mount -ar" actually mount file systems read-only.
* Remove unused code.davidxu2006-03-131-24/+0
|
* Make sure that we are adding a path token to the audit record in open(2).csjp2006-03-111-2/+3
| | | | | | Do this by making sure we are using the AUDITVNODE1 mask in the namei flags. Obtained from: TrustedBSD Project
* Go over calcru and friends once more.phk2006-03-111-47/+48
| | | | | Reintroduce the monotonicity for the normal case and make the two special cases behave in what is belived to be the most sensible fasion.
* Block secondary writes while expunging active unlinked files.tegge2006-03-111-2/+3
| | | | | | | | | | Fix detection of active unlinked files by checking VI_OWEINACT and VI_DOINGINACT in addition to v_usecount. Defer inactive handling for unlinked files if the file system is mostly suspended (secondary writes being blocked). Perform deferred inactive handling after the file system is resumed.
* Implement printf 'X' conversion for both libstand and kernel.jkim2006-03-091-10/+13
|
* Oops, forgot newline.phk2006-03-091-1/+1
|
* Add slop to "backwards" cpu accounting messages, 3 usec or 1% whicheverphk2006-03-091-1/+5
| | | | | | | | | | | | | triggers. This should eliminate all the trivial messages which result from minor increases in cpu_tick frequency. Machines which don't du cpu clock fiddling shouldn't issue "backwards" messages now. Laptops and other machines where the initial estimate of cputicks may be waaaay off will still issue warnings.
* silence cpu_tick calibration and notice only (under bootverbose)phk2006-03-091-15/+8
| | | | when the frequency increases.
* Ignore kenv strings which overflow the room we have, rather than pretendphk2006-03-091-1/+6
| | | | we have room for them.
* Remove _STOPEVENT call, it is already called in issignal, simplifydavidxu2006-03-091-6/+1
| | | | code for SIGKILL signal.
* Use vn_start_secondary_write() and vn_finished_secondary_write() as ategge2006-03-083-6/+110
| | | | | | | | | | | replacement for vn_write_suspend_wait() to better account for secondary write processing. Close race where secondary writes could be started after ffs_sync() returned but before the file system was marked as suspended. Detect if secondary writes or softdep processing occurred during vnode sync loop in ffs_sync() and retry the loop if needed.
* Fix exec_map resource leaks.ups2006-03-081-10/+19
| | | | Tested by: kris@
* Properly handle the case when the packet secondary zone can't allocateandre2006-03-081-2/+2
| | | | | | | | | further mbuf clusters to attach to mbufs. Reported by: kris Tested by: kris Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 days
* Style nit.jhb2006-03-071-2/+1
|
* For consistency sake, use >= MINCLSIZE rather than > MINCLSIZE to determinejhb2006-03-071-1/+1
| | | | | | | | | | whether or not to allocate a full mbuf cluster rather than just a plain mbuf when adding on additional mbufs in m_getm(). In practice, there wasn't any resulting mem trashing since m_getm() doesn't ever allocate an mbuf with a packet header, and MINCLSIZE is the available payload in an mbuf with a header rather than the available payload in a plain mbuf. Discussed with: andre (lightly)
* Add missing cast.phk2006-03-041-1/+1
|
* More detailed logging if timestepwarnings are enabled.phk2006-03-041-5/+8
|
* use strlcpy in cvtstatfs and copy_statfs instead of bcopy to ensureps2006-03-042-8/+8
| | | | | | the copied strings are properly terminated. bzero the statfs32 struct in copy_statfs.
* Fix bug in malloc_uninit():ps2006-03-031-1/+3
| | | | | | | | | | | Releasing items from the mt_zone can not be done by a simple uma_zfree() call since mt_zone is allocated with the UMA_ZONE_MALLOC flag. Use uma_zfree_arg instead and supply the slab. This bug caused panics in low memory situations on unloading kernel modules containing MALLOC_DEFINE(..) statements. Submitted by: ups
* Don't truncate f_mntfromname & f_mntonname to 16 characters whenps2006-03-032-4/+4
| | | | | translating statfs into ostatfs. This allows 4.x binaries making statfs calls to work on 6.x.
* - Print message about cpufreq and timecounter TSCmnag2006-03-031-1/+8
| | | | | Approved by: njl MFC after: 1 day
* Eliminate a deadlock when creating snapshots. Blocking vn_start_write() musttegge2006-03-021-0/+2
| | | | | | be called without any vnode locks held. Remove calls to vn_start_write() and vn_finished_write() in vnode_pager_putpages() and add these calls before the vnode lock is obtained to most of the callers that don't already have them.
* Don't try to show marker nodes.tegge2006-03-021-1/+1
|
* Add signal set sq_kill to sigqueue structure, the member saves alldavidxu2006-03-021-3/+23
| | | | | signals sent by kill() syscall, without this, a signal sent by sigqueue() can cause a signal sent by kill() to be lost.
* Suffer a little bit of math every 16 second and tighten calibration ofphk2006-03-021-12/+24
| | | | cpu_ticks to the low side of PPM.
* - Move softdep from using a global worklist to per-mount worklists. Thisjeff2006-03-021-10/+0
| | | | | | | | | | | | | | | | | | | | | | | has many positive effects including improved smp locking, reducing interdependencies between mounts that can lead to deadlocks, etc. - Add the softdep worklist and various counters to the ufsmnt structure. - Add a mount pointer to the workitem and remove mount pointers from the various structures derived from the workitem as they are now redundant. - Remove the poor-man's semaphore protecting softdep_process_worklist and softdep_flushworklist. Several threads may now process the list simultaneously. - Add softdep_waitidle() to block the thread until all pending dependencies being operated on by other threads have been flushed. - Use softdep_waitidle() in unmount and snapshots to block either operation until the fs is stable. - Remove softdep worklist processing from the syncer and move it into the softdep_flush() thread. This thread processes all softdep mounts once each second and when it is called via the new softdep_speedup() when there is a resource shortage. This removes the softdep hook from the kernel and various hacks in header files to support it. Reviewed by/Discussed with: tegge, truckman, mckusick Tested by: kris
* Regenerate.davidxu2006-03-012-24/+24
|
* Let kernel POSIX timer code and mqueue code to use integer as a resourcedavidxu2006-03-013-47/+47
| | | | | handle, the timer_t and mqd_t types will be a pointer which userland will define it.
* Fix 32bit sendfile by implementing kern_sendfile so that it takesps2006-02-281-38/+55
| | | | | | | | the header and trailers as iovec arguments instead of copying them in inside of sendfile. Reviewed by: jhb MFC after: 3 weeks
* One more grammar nit.glebius2006-02-271-1/+1
| | | | Submitted by: ru
* 1. Remove aio entry from lists earlier in aio_free_entry,davidxu2006-02-261-19/+17
| | | | | | | | | | | | | | | | | | so other threads can not see it if we unlock the proc lock (this can happen in knlist_delete). Don't do wakeup, it is not necessary. 2. Decrease kaio_buffer_count in biohelper rather than doing it in aio_bio_done_notify. 3. In aio_bio_done_notify, don't send notification if KAIO_RUNDOWN was set, because the process is already in single thread mode. 4. Use assignment to initialize aiothreadflags. 5. AIOCBLIST_RUNDOWN is not useful, axe the code using it. 6. use LIO_NOP instead of zero.
* Fix several typos and trim spaces at eol.glebius2006-02-261-7/+7
| | | | | PR: kern/93759 Submitted by: Antoine Brodin <antoine.brodin laposte.net>
* Always print a newline char at the end of the line.scottl2006-02-251-1/+2
|
* Use the recently added msleep_spin() function to simplify thejhb2006-02-231-56/+41
| | | | | | callout_drain() logic. We no longer need a separate non-spin mutex to do sleep/wakeup with, instead we can now just use the one spin mutex to manage all the callout functionality.
* 1. Refine kern_sigtimedwait() to remove redundant code.davidxu2006-02-231-31/+43
| | | | | | | 2. Fix a bug, if thread got a SIGKILL signal, call sigexit() to kill its process. MFC after: 3 days
* Code cleanup, simply compare with curproc.davidxu2006-02-231-2/+1
|
* - Use vfs_ref/rel to protect a mountpoint from going away while VFS_STATFSjeff2006-02-232-20/+58
| | | | | | | is being called. Be sure to grab the ref before we unlock the vnode to prevent the mount from disappearing. Tested by: kris
* - Release the mount ref once the vnode has been recycled rather than oncejeff2006-02-231-3/+2
| | | | | | | | | the last reference is dropped. I forgot that vnodes can stick around for a very long time until processes discover that they are dead. This means that a vnode reference is not sufficient to keep the mount referenced and even more code will be required to ref mount points. Discovered by: kris
OpenPOWER on IntegriCloud