summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Explicitly initialize all cdevsw methods with the relevant nofoo() functionphk2003-03-021-0/+11
| | | | if they are NULL.
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-1/+1
|
* Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.des2003-03-022-57/+57
|
* uiomove-related caddr_t -> void * (just the low-hanging fruit)des2003-03-023-10/+9
|
* Convert one of our main caddr_t consumers, uiomove(9), to void *.des2003-03-021-5/+5
|
* Clean up whitespace, unregisterize, ANSIfy, remove prototypes madedes2003-03-021-55/+19
| | | | superfluous by ANSIfication.
* NO_GEOM cleanup:phk2003-03-021-8/+1
| | | | Remove cdevsw->d_size() implementation. No longer needed.
* NODEVFS cleanup:phk2003-03-021-9/+3
| | | | Replace devfs_{create,destroy} hooks with direct function calls.
* - Hold the vnode interlock across calls to bgetvp instead of acquiring itjeff2003-03-022-3/+5
| | | | | internally. This is required to stop multiple bufs from being associated with a single lblkno.
* Remove unneeded code added in revision 1.188.tegge2003-03-011-32/+9
|
* - gc USE_BUFHASH. The smp locking of the buf cache renders this useless.jeff2003-03-012-108/+0
|
* Check kse group limit before linking new ksegrp.davidxu2003-02-282-4/+4
|
* Add the flip-side check: If a driver wants a particular major#, makephk2003-02-271-0/+9
| | | | sure it is marked as allocated in reserved_majors[]. Whine if it wasn't.
* We can now properly return ENODEV in nommap(), so do it.mux2003-02-271-2/+1
| | | | Remove the now wrong comment which says we can't.
* Add support for allocating a device driver major number on demand.phk2003-02-271-2/+15
| | | | | | | | | | | | | | | To do this, initialize the d_maj member of the cdevsw to MAJOR_AUTO. When the cdevsw is first passed to make_dev() a free major number will be assigned. Until we have a bit more experience with this a printf will announce this fact. Major numbers are not reclaimed, so loading/unloading the same device driver which uses MAJOR_AUTO will eventually deplete the pool of free major numbers and the system will panic when it can not allocate one. Still undecided who to invonvenience with the solution to this.
* When a process has been waiting on a condition variable or mutex theharti2003-02-272-0/+3
| | | | | | | | | | | | td_wmesg field in the thread structure points to the description string of the condition variable or mutex. If the condvar or the mutex had been initialized from a loadable module that was unloaded in the meantime, td_wmesg may now point to invalid memory. Retrieving the process table now may panic the kernel (or access junk). Setting the td_wmesg field to NULL after unblocking on the condvar/mutex prevents this panic. PR: kern/47408 Approved by: jake (mentor)
* NODEVFS cleanup:phk2003-02-271-22/+0
| | | | | Remove cdevsw_add() and cdevsw_remove(), they served us well for a long time. Bump __FreeBSD_version to 500104 to mark this.
* Release sched_lock before calling upcall_free.davidxu2003-02-272-2/+2
|
* Change the process flags P_KSES to be P_THREADED.julian2003-02-2714-34/+34
| | | | This is just a cosmetic change but I've been meaning to do it for about a year.
* o fix ppsratecheck to interpret a maxpps of zero as "ignore everything"sam2003-02-261-1/+5
| | | | | o add a comment explaining the significance of using 0 or -1 (actually any negative value) for maxpps
* Fix a bug when handling SIGCONT.davidxu2003-02-261-7/+0
| | | | Reported By: Mike Makonnen <mtm@identd.net>
* Introduce a new taskqueue that runs completely free of Giant, and inscottl2003-02-261-2/+19
| | | | | | | turns runs its tasks free of Giant too. It is intended that as drivers become locked down, they will move out of the old, Giant-bound taskqueue and into this new one. The old taskqueue has been renamed to taskqueue_swi_giant, and the new one keeps the name taskqueue_swi.
* Add a missing '!'.davidxu2003-02-262-4/+4
|
* Add a simple facility to allow round roubin in userland.davidxu2003-02-262-82/+90
| | | | Reviewed by: julain
* When doing cleanup of excessive buffers in bdwrite (see kern/vfs_bio.cmckusick2003-02-251-2/+8
| | | | | | | | delta 1.371) we must ensure that we do not get ourselves into a recursive trap endlessly trying to clean up after ourselves. Reported by: Attila Nagy <bra@fsn.hu> Sponsored by: DARPA & NAI Labs.
* Unbreak mutex profiling (at least for me).mtm2003-02-252-6/+30
| | | | | | | | | | o Always check for null when dereferencing the filename component. o Implement a try-and-backoff method for allocating memory to dump stats to avoid a spin-lock -> sleep-lock mutex lock order panic with WITNESS. Approved by: des, markm (mentor) Not objected: jhb
* - Add the missing NULL interlock argument to a recently added BUF_LOCK.jeff2003-02-251-1/+1
|
* Prevent large files from monopolizing the system buffers. Keepmckusick2003-02-252-3/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | track of the number of dirty buffers held by a vnode. When a bdwrite is done on a buffer, check the existing number of dirty buffers associated with its vnode. If the number rises above vfs.dirtybufthresh (currently 90% of vfs.hidirtybuffers), one of the other (hopefully older) dirty buffers associated with the vnode is written (using bawrite). In the event that this approach fails to curb the growth in it the vnode's number of dirty buffers (due to soft updates rollback dependencies), the more drastic approach of doing a VOP_FSYNC on the vnode is used. This code primarily affects very large and actively written files such as snapshots. This change should eliminate hanging when taking snapshots or doing background fsck on very large filesystems. Hopefully, one day it will be possible to cache filesystem metadata in the VM cache as is done with file data. As it stands, only the buffer cache can be used which limits total metadata storage to about 20Mb no matter how much memory is available on the system. This rather small memory gets badly thrashed causing a lot of extra I/O. For example, taking a snapshot of a 1Tb filesystem minimally requires about 35,000 write operations, but because of the cache thrashing (we only have about 350 buffers at our disposal) ends up doing about 237,540 I/O's thus taking twenty-five minutes instead of four if it could run entirely in the cache. Reported by: Attila Nagy <bra@fsn.hu> Sponsored by: DARPA & NAI Labs.
* Remove a bogus comment.davidxu2003-02-252-12/+0
|
* Remove a never true condition.davidxu2003-02-251-2/+1
|
* - Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.jeff2003-02-255-69/+65
| | | | | | | | | | - Remove the buftimelock mutex and acquire the buf's interlock to protect these fields instead. - Hold the vnode interlock while locking bufs on the clean/dirty queues. This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another BUF_LOCK with a LK_TIMEFAIL to a single lock. Reviewed by: arch, mckusick
* Cleanup of the d_mmap_t interface.mux2003-02-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386
* Don't NULL out p_fd until after closefd() has been called. This isn'tscottl2003-02-241-4/+6
| | | | | totally correct, but it has caused breakage for too long. I welcome someone with more fd fu to fix it correctly.
* Remove a XXXKSE. kg_completed now needs proc lock.davidxu2003-02-242-2/+0
|
* Backout last surplus commit. That day just wasn't my day.davidxu2003-02-242-10/+0
|
* Sync new socket nonblocking/async state with file flags in accept().tegge2003-02-231-0/+7
| | | | | PR: 1775 Reviewed by: mbr
* Bracket the kern.vnode sysctl in #ifdef notyet because it resultsphk2003-02-231-0/+2
| | | | | | | in massive locking issues on diskless systems. It is also not clear that this sysctl is non-dangerous in its requirements for locked down memory on large RAM systems.
* OK, I was too sleepy there...phk2003-02-231-2/+4
| | | | Pointy hat over here!
* Implement CLOCK_MONOTONIC.phk2003-02-231-2/+3
|
* Add a /a modifier to the show ktr ddb command, which prints the whole tracejake2003-02-221-1/+7
| | | | | buffer without stopping. Useful if you just want to capture the output but can't run ktrdump.
* Don't panic when enumerating SYSCTL_NODE() nodes without any childrenrwatson2003-02-221-1/+2
| | | | | | nodes. Submitted by: green, Hiten Pandya <hiten@unixdaemons.com>
* Remove a comment which hasn't been true since rev. 1.158mtm2003-02-221-1/+0
| | | | Approved by: jhb, markm (mentor)(implicit)
* Export the name of the device used to mount the root file system asrwatson2003-02-221-0/+24
| | | | | | | kern.rootdev. If rootdev is undefined (NFS mount, etc), export an empty string. Desired by: peter
* Missing M_TRYWAIT from so_upcall third argument.peter2003-02-212-2/+2
|
* NO_GEOM cleanup:phk2003-02-212-2/+2
| | | | | | | | | | | | | Retire the "d_dump_t" and use the "dumper_t" type instead. Dumper_t takes a void * as first arg which is more general than the dev_t taken by d_dump_t. (Remember: we could have net-dumpers if somebody wrote us one!) Define the convention for GEOM controlled disk devices to be that the first argument to the dumper function is the struct disk pointer. Change device drivers accordingly.
* If UTS kernel is calling kse_wakeup for itself, do nothing.davidxu2003-02-212-6/+12
|
* Change the console interface to pass a "struct consdev *" instead of aphk2003-02-201-4/+4
| | | | | | | | | dev_t to the method functions. The dev_t can still be found at struct consdev *->cn_dev. Add a void *cn_arg element to struct consdev which the drivers can use for retrieving their softc.
* Add a dead_cdevsw which does its best to return ENXIO if at all possible.phk2003-02-201-3/+53
| | | | | | | In devsw() return dead_cdevsw instead of NULL in case the dev_t does not have a si_devsw. This may improve our survival chances with devices which go away unexpectedly.
* Forgot to set KU_DOUPCALL in kse_wakeup.davidxu2003-02-202-0/+2
|
* Add a timeout parameter to kse_release.davidxu2003-02-205-26/+58
|
OpenPOWER on IntegriCloud