summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Convert vn.c into a module (loadable and static).Peter Wemm1999-01-211-45/+53
| | | | Notes: svn path=/head/; revision=42985
* Typo: s/mdev/bdev/, added in rev 1.47 (must fix in RELENG_3 too)Peter Wemm1999-01-212-4/+4
| | | | Notes: svn path=/head/; revision=42984
* Removed from the secure/lib/libcrypt area, because of the rewrite to howBrandon Gillespie1999-01-219-950/+0
| | | | | | | | | the Makefile handles des support by just including the single .c file. Reviewed by: Mark Murray Notes: svn path=/head/; revision=42983
* Moved from the old secure/lib/libcrypt area, because of the rewrite to howBrandon Gillespie1999-01-215-0/+532
| | | | | | | | | the Makefile handles des support by just including the single .c file. Reviewed by: Mark Murray Notes: svn path=/head/; revision=42982
* Rewrite of crypt library to be more modular, and addition of theBrandon Gillespie1999-01-2110-149/+1135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Secure Hashing Algorithm - 1 (SHA-1), along with the further refinement of what $x$salt$hash means. With this new crypt the following are all acceptable: $1$ $MD5$ $SHA1$ Note: $2$ is used by OpenBSD's Blowfish, which I considered adding as $BF$, but there is no actual need for it with SHA-1. However, somebody wishing to add OpenBSD password support could easilly add it in now. There is also a malloc_crypt() available in the library now, which behaves exactly the same as crypt(), but it uses a malloced buffer instead of a static buffer. However, this is not standard so will likely not be used much (at all). Also, for those interested I did a brief speed test Pentium 166/MMX, which shows the DES crypt to do approximately 2640 crypts a CPU second, MD5 to do about 62 crypts a CPU second and SHA1 to do about 18 crypts a CPU second. Reviewed by: Mark Murray Notes: svn path=/head/; revision=42981
* Typo: s/bpreassignbuf/pbreassignbuf/ so the prototype matches it's functionPeter Wemm1999-01-212-4/+4
| | | | Notes: svn path=/head/; revision=42980
* Mainly changes to support the new swapper. The big adjustment is thatMatthew Dillon1999-01-211-1/+1
| | | | | | | | | swap blocks are now in PAGE_SIZE'd increments instead of DEV_BSIZE'd increments. We still convert to DEV_BSIZE'd increments for the backing store I/O, but everything else is in PAGE_SIZE increments. Notes: svn path=/head/; revision=42979
* Move many of the vm_pager_*() functions from vm_pager.c to inlines inMatthew Dillon1999-01-211-1/+1
| | | | | | | vm_pager.h Notes: svn path=/head/; revision=42978
* Move many of the vm_pager_*() functions from vm_pager.c to inlines inMatthew Dillon1999-01-211-1/+1
| | | | | | | | | | | | | | | vm_pager.h Added argument to getpbuf() and relpbuf() to allow each subsystem to specify a different hard limit on the number of simultanious physical bufferes that said subsystem may allocate. Without this feature, one subsystem ( e.g. the vfs clustering code ) could hog *ALL* the pbufs, causing a deadlock in the pager in a low memory situation. Same for trypbuf(). Notes: svn path=/head/; revision=42977
* Reorganized some of the low memory testing code to make it more useful.Matthew Dillon1999-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Removed call to vm_object_collapse(), which can block. This was being called without the pageout code holding any sort of reference on the vm_object or vm_page_t structures being manipulated. Since this code can block, it was possible for other kernel code to shred the state the pageout code was assuming remained intact. Fixed potential blocking condition in vm_pageout_page_free() ( which could cause a deadlock in a low-memory situation ). Currently there is a hack in-place to deal with clean filesystem meta-data polluting the inactive page queue. John doesn't like the hack, and neither do I. Revamped and commented a portion of the pageout loop. Added protection against potential memory deadlocks with OBJT_VNODE when using VOP_ISLOCKED(). The problem is that vp->v_data can be NULL which causes VOP_ISLOCKED() to return a less informed answer. remove vm_pager_sync() -- none of the pagers use it any more ( the old swapper used to. The new one does not ). Notes: svn path=/head/; revision=42976
* The TAILQ hashq has been turned into a singly-linked=list link,Matthew Dillon1999-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | reducing the size of vm_page_t. SWAPBLK_NONE and SWAPBLK_MASK are defined here. These actually are more generalized then their names imply, but their placement is somewhat of a legacy issue from a prior test version of this code that put the swapblk in the vm_page_t structure. That test code was eventually thrown away. The legacy remains. Added vm_page_flash() inline. Similar to vm_page_wakeup() except that it does not clear PG_BUSY ( one assumes that PG_BUSY is already clear ). Used by a number of routines to wakeup waiters. Collapsed some of the code in inline calls to make other inline calls. GCC will optimize this well and it reduces duplication. vm_page_free() and vm_page_free_zero() inlines added to convert to the proper vm_page_free_toq() call. vm_page_sleep_busy() inline added, replacing vm_page_sleep() ( which has been removed ). This implements a much more optimizable page-waiting function. Notes: svn path=/head/; revision=42975
* The hash table used to be a table of doubly-link list headers ( twoMatthew Dillon1999-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pointers per entry ). The table has been changed to a singly linked list of vm_page_t pointers. The table has been doubled in size, but the entries only take half the space so a net-zero change in memory use. The hash function has been changed, hopefully for the better. The combination of the larger hash table size of changed function should keep the chain length down to a reasonable number (0-3, average 1). vm_object->page_hint has been removed. This 'optimization' was not only never needed, but costs as much as a hash chain link to implement. While having page_hint in vm_object might result in better locality of reference, the cost is not worth the space in vm_object or the extra instructions in my view. vm_page_alloc*() functions have been inlined and call a generalized non-inlined vm_page_alloc_toq() which combines the standard alloc and zero-page alloc functions together, reducing code size and the L1 cache footprint. Some reordering has been done... not much. The delinking code should be faster ( because unlinking a doubly-linked list requires four memory ops and unlinking a singly linked list only requires two ), and we get a hash consistancy check for free. vm_page_rename() now automatically sets the page's dirty bits. vm_page_alloc() does not try to manually inline freeing a cache page. Instead, it now properly calls vm_page_free(m) ... vm_page_free() is really too complex to manually inline. vm_await(), supporting asleep(), has been added. Notes: svn path=/head/; revision=42974
* The vm_object structure is now somewhat smaller due to the removalMatthew Dillon1999-01-211-1/+1
| | | | | | | | | | | | of most of the swap-pager-specific fields, the removal of the id, and the removal of paging_offset. A new inline, vm_object_pip_wakeupn() has been added to subtract an arbitrary number n from the paging_in_progress count and then wakeup waiters as necessary. n may be 0, resulting in a 'flash'. Notes: svn path=/head/; revision=42973
* object->id was badly implemented. It has simply been removed.Matthew Dillon1999-01-211-1/+1
| | | | | | | | | | | | | | | | | | object->paging_offset has been removed - it was used to optimize a single OBJT_SWAP collapse case yet introduced massive confusion throughout vm_object.c. The optimization was inconsequential except for the claim that it didn't have to allocate any memory. The optimization has been removed. madvise() has been fixed. The old madvise() could be made to operate on shared objects which is a big no-no. The new one is much more careful in what it modifies. MADV_FREE was totally broken and has now been fixed. vm_page_rename() now automatically dirties a page, so explicit dirtying of the page prior to calling vm_page_rename() has been removed. Notes: svn path=/head/; revision=42972
* Objects associated with raw devices are no longer counted in the VM statsMatthew Dillon1999-01-211-1/+1
| | | | | | | | total because they may contain absurd numbers ( like the size of all of physical memory if you mmap() /dev/mem ). Notes: svn path=/head/; revision=42971
* General cleanup related to the new pager. We no longer have to worryMatthew Dillon1999-01-211-1/+1
| | | | | | | | | | | | | | about conversions of objects to OBJT_SWAP, it is done automatically now. Replaced manually inserted code with inline calls for busy waiting on pages, which also incidently fixes a potential PG_BUSY race due to the code not running at splvm(). vm_objects no longer have a paging_offset field ( see vm/vm_object.c ) Notes: svn path=/head/; revision=42970
* Potential bug fix, do not just clear PG_BUSY... call vm_page_wakeup()Matthew Dillon1999-01-211-1/+1
| | | | | | | | | | instead to properly handle any waiters. Added comments, added support for M_ASLEEP. Generally treat M_ flags as flags instead of constants to compare against. Notes: svn path=/head/; revision=42969
* Removed low-memory blockages at fork. This is the wrong place to putMatthew Dillon1999-01-211-1/+1
| | | | | | | this sort of test. We need to fix the low-memory handling in general. Notes: svn path=/head/; revision=42968
* Mainly cleanup. Removed some inappropriate low-memory handling codeMatthew Dillon1999-01-211-1/+1
| | | | | | | | and added lots of comments. Add tie-in to vm_pager ( and thus the new swapper ) to deallocate backing swap for dirtied pages on the fly. Notes: svn path=/head/; revision=42967
* The default_pager's interaction with the swap_pager has been reorganized,Matthew Dillon1999-01-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | and the swap_pager has been completely replaced. The new swap pager uses the new blist radix-tree based bitmap allocator for low level swap allocation and deallocation. The new allocator is effectively O(5) while the old one was O(N), and the new allocator allocates all required memory at init time rather then at allocate memory on the fly at run time. Swap metadata is allocated in clusters and stored in a hash table, eliminating linearly allocated structures. Many, many features have been rewritten or added. Swap space is now reallocated on the fly providing a poor-mans auto defragmentation of swap space. Swap space that is no longer needed is freed on a timely basis so no garbage collection is necessary. Swap I/O is marked B_ASYNC and NFS has been fixed to do the right thing with it, so NFS-based paging now has around 10x the performance as it did before ( previously NFS enforced synchronous I/O for paging ). Notes: svn path=/head/; revision=42966
* Added support for VOP_FREEBLKS(), reducing MFS's impact on swap andMatthew Dillon1999-01-211-1/+1
| | | | | | | | | | increasing performance by deallocating at least some of the backing store when files are removed. Protect mfsp->buf_queue access at splbio(). Notes: svn path=/head/; revision=42965
* Access to mfsp->buf_queue must be protected at splbio(). Other minorMatthew Dillon1999-01-211-1/+1
| | | | | | | adjustments also made, such as passing mfsp to mfs_doio() directly. Notes: svn path=/head/; revision=42964
* Move EXT2FS to be more visible, and give it a description. Also makeEivind Eklund1999-01-213-18/+48
| | | | | | | the text from my last commit somewhat better. Notes: svn path=/head/; revision=42963
* Renamed M_KERNEL to a more appropriate M_USE_RESERVE.Matthew Dillon1999-01-211-1/+1
| | | | Notes: svn path=/head/; revision=42962
* The main operational changes are in getblk()'s handling of theMatthew Dillon1999-01-211-1/+1
| | | | | | | | | | B_DELWRI and B_CACHE flags, fixing a bug that showed up with NFS. Also, a number of cases where manually inserted code has been removed and replaced with an inline function call giving us better functional isolation in the source. Notes: svn path=/head/; revision=42961
* The code that reclaims descriptors from in-transit unix domainMatthew Dillon1999-01-211-1/+1
| | | | | | | | | | descriptor-passing messages was calling sorflush() without checking to see if the descriptor was actually a socket. This can cause a crash by exiting programs that use the mechanism under certain circumstances. Notes: svn path=/head/; revision=42960
* Fixed a potential bug ( but maybe not ), where sendfile() clears PG_BUSYMatthew Dillon1999-01-211-1/+1
| | | | | | | | on a page without testing for waiters. Also collapsed busy wait into new vm_page_sleep_busy() inline ( see vm/vm_page.h ) Notes: svn path=/head/; revision=42959
* This module was used only by the old swapper and has been #if'd out,Matthew Dillon1999-01-211-1/+1
| | | | | | | and will be eventually removed if no other use is found for it. Notes: svn path=/head/; revision=42958
* This is a rather large commit that encompasses the new swapper,Matthew Dillon1999-01-2163-2062/+3198
| | | | | | | | | | | | | changes to the VM system to support the new swapper, VM bug fixes, several VM optimizations, and some additional revamping of the VM code. The specific bug fixes will be documented with additional forced commits. This commit is somewhat rough in regards to code cleanup issues. Reviewed by: "John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com> Notes: svn path=/head/; revision=42957
* Add new blist module - radix tree based bitmap allocator withMatthew Dillon1999-01-212-0/+1029
| | | | | | | size hinting. Will be used by the new swapper. Notes: svn path=/head/; revision=42956
* Update pstat -s to handle both old and new swapper.Matthew Dillon1999-01-212-76/+290
| | | | | | | Add pstat -ss to dump new swapper's radix tree. Notes: svn path=/head/; revision=42955
* This is now 4.0-currentJordan K. Hubbard1999-01-211-2/+2
| | | | Notes: svn path=/head/; revision=42953
* Update to reflect changes in kernel moduleGreg Lehey1999-01-211-37/+59
| | | | | | | | | Remove references to LKMs Change descriptions on read command (HEADS UP: this command has changed in an incompatible manner) Notes: svn path=/head/; revision=42948
* Update to reflect major changes in vinum kernel moduleGreg Lehey1999-01-214-131/+431
| | | | Notes: svn path=/head/; revision=42947
* Update to reflect changes in kernel lkmGreg Lehey1999-01-211-84/+169
| | | | Notes: svn path=/head/; revision=42946
* Remove -DRAID5 from CFLAGSGreg Lehey1999-01-211-2/+2
| | | | Notes: svn path=/head/; revision=42945
* Include Peter Wemm's renaming and restructuringGreg Lehey1999-01-211-47/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change from lkm to kld Add field plexsdno to sd struct Add flag VF_NEWBORN to drive, sd, plex and volume structs, indicating that the object has just been created. Add object types for raw (unattached) plexes and subdisks Remove definitions of VOLNO, PLEXNO and SDNO (now functions Volno, Plexno and Sdno) Move revive parameters from struct plex to struct sd. struct plex: maintain a count of the number of inaccessible subdisks. remove defective and unmapped regions. Debug flags: make an enum (previously #define) Set default revive block size to 64kB (was 32 kB) Notes: svn path=/head/; revision=42944
* Retain some of the RAID5 texts even in the non-RAID5 versions.Greg Lehey1999-01-211-1/+67
| | | | | | | | | | | Previously, accidentally starting the wrong version could corrupt the RAID5 configuration. Add functions Volno, Plexno and Sdno to replace the old defines VOLNO, PLEXNO and SDNO. Notes: svn path=/head/; revision=42943
* Remove states:Greg Lehey1999-01-211-28/+21
| | | | | | | | | | plex_reviving (now we revive subdisks) drive_coming_up (never happened) Add state sd_reviving. Notes: svn path=/head/; revision=42942
* Include Peter Wemm's renaming and restructuringGreg Lehey1999-01-211-413/+456
| | | | | | | | | | | | | | | | | | | | | Change from lkm to kld Serious rewrite. No longer call set_<foo>_state to set the state based only on other objects; instead, add functions update_<foo>_state, which determine what the state should be by themselves. This allows the set_<foo>_state functions to shrink enough to be almost intelligible. Remove flags setstate_recurse and setstate_recursing. Remove plex defective regions and unmapped regions, which were maintained but not used. Change code to allow daemon to perform operations formerly kludged into an interrupt context. Remove the DIRTYCONFIG kludge. Notes: svn path=/head/; revision=42941
* Change the style of revive: revive subdisks instead of plexes. ThisGreg Lehey1999-01-211-35/+86
| | | | | | | | | makes it easier to keep track of which parts of a plex need reviving. Use sdio, not vinumstrategy, to write to the subdisk. Notes: svn path=/head/; revision=42940
* Include Peter Wemm's renaming and restructuringGreg Lehey1999-01-211-83/+41
| | | | | | | | | | | | | | | | | | | | | Change from lkm to kld Remove #ifdefs for FreeBSD 2.c vinumstrategy: Support anonymous (`raw') subdisks and plexes. Change code to allow daemon to perform operations formerly kludged into an interrupt context. Remove the DIRTYCONFIG kludge. No longer set B_ORDERED for reviving subdisks. I suspect this wouldn't work correctly, and it should be done in a different manner in vinumrevive.c sdio: set subdisk state correctly on error start to remove code that doesn't make any sense any more. Notes: svn path=/head/; revision=42939
* Add keywords help, makedev, quit and setdaemonGreg Lehey1999-01-211-1/+7
| | | | Notes: svn path=/head/; revision=42938
* MMalloc: remove directory part of name correctlyGreg Lehey1999-01-211-5/+4
| | | | Notes: svn path=/head/; revision=42937
* Create functions lockdrive and unlockdrive to handle drive lockingGreg Lehey1999-01-211-2/+35
| | | | Notes: svn path=/head/; revision=42936
* Add keywords makedev, setdaemon and help.Greg Lehey1999-01-211-1/+6
| | | | Notes: svn path=/head/; revision=42935
* Remove ioctls VINUM_GETUNMAPPED and VINUM_GETDEFECTIVE (we no longerGreg Lehey1999-01-211-3/+7
| | | | | | | | | have regions). Add definitions for VINUM_DAEMON, VINUM_FINDDAEMON and VINUM_DAEMON Notes: svn path=/head/; revision=42934
* Include Peter Wemm's renaming and restructuringGreg Lehey1999-01-212-392/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove #ifdefs for FreeBSD 2.c Change from lkm to kld correct type of `flags' in calls to set_drive_state. set_drive_parms: handle anonymous drives correctly (remove them) drive VOP functions: use the PID of the original opener to fool the lock manager. open_drive: be quiet about failures (they're normal when scanning the partitions). close_drive: lock drive before closing. remove_drive: lock drive before deallocating. read_drive_label: set drive up when all is OK check_drive: Complete rewrite. Offload most of the code to the new vinum_scandisk format_config: use snprintf and %qd options to make much less emetic. Remove old supporting functions. vinum_scandisk: Moved here from vinum.c Almost complete rewrite, incorporating much of what was check_drive. We still don't have a general way to find the drives on a system, so get the user to supply the names via the `read' command. For each device, try each possible compatibility slice name (there's a danger of finding both /dev/da1h and /dev/da0s1h otherwise). Sort the partitions found in reverse order of last update time and read them in, setting the `update' parameter to parse_config and descendents. save_config: rename to daemon_save_config, since the function is now called by the daemon. Create a new function save_config which queues the request with the daemon. daemon_save_config: some mods to allow for the unfamiliar environment. Notes: svn path=/head/; revision=42933
* Include Peter Wemm's renaming and restructuringGreg Lehey1999-01-211-14/+25
| | | | | | | | | | Change from lkm to kld Recover from I/O errors by passing the request to the daemon, except for plex I/O, which is not fault tolerant. Notes: svn path=/head/; revision=42932
* Remove old cruftGreg Lehey1999-01-211-11/+2
| | | | Notes: svn path=/head/; revision=42931