summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
* Unstaticize psratio and staticize profprocs. psratio needs to be exportedbde1996-06-233-15/+18
| | | | to trap.c to fix user profiling.
* Clean-up the new VM map procfs code, and also add support for executabledyson1996-06-182-2/+4
| | | | | format file "etype". It contains a description of the binary type for a process.
* Add a couple of #ifdef DEVFS/#endif clauses to slence the followingwpaul1996-06-171-1/+5
| | | | | | | | | | | | | | | | | compiler warnings which occur if you don't have 'options DEVFS' in your kernel config file: ../../kern/kern_descrip.c: In function `fildesc_drvinit': ../../kern/kern_descrip.c:1103: warning: unused variable `fd' ../../kern/kern_descrip.c: At top level: ../../kern/kern_descrip.c:1095: warning: `devfs_token_stdin' defined but not use d ../../kern/kern_descrip.c:1096: warning: `devfs_token_stdout' defined but not us ed ../../kern/kern_descrip.c:1097: warning: `devfs_token_stderr' defined but not us ed ../../kern/kern_descrip.c:1098: warning: `devfs_token_fildesc' defined but not u sed
* Reduced nesting of #includes in random.h and adjusted isa/random_machdep.cbde1996-06-171-1/+2
| | | | | | to match (pc98/random_machdep.c probably requires a similar change). This is a problem area for the PC98 merge - all PC98 ifdefs in <machine/*.h> are kludges to work around incorrect layering.
* Moved initialization of defaults for the label for the whole disk frombde1996-06-171-1/+21
| | | | | | | disklabel(8) to the kernel (dsopen()). Drivers should initialize the hardware values (rpm, interleave, skews). Drivers currently don't do this, but it usually doesn't matter since rotational position stuff is normally disabled.
* Disable direct writes for non-blocking output.dyson1996-06-171-2/+5
|
* The Great PC98 Merge.asami1996-06-142-2/+16
| | | | | | | | All new code is "#ifdef PC98"ed so this should make no difference to PC/AT (and its clones) users. Ok'd by: core Submitted by: FreeBSD(98) development team
* A fast memory copy for Pentiums using floating point registers.asami1996-06-131-1/+9
| | | | | | | | | | | | | | | | | | It is called from copyin and copyout. The new routine is conditioned on I586_CPU and I586_FAST_BCOPY, so you need options "I586_FAST_BCOPY" (quotes essenstial) in your kernel config file. Also, if you have other kernel types configured in your kernel, an additional check to make sure it is running on a Pentium is inserted. (It is not clear why it doesn't help on P6s, it may be just that the Orion chipset doesn't prefetch as efficiently as Tritons and friends.) Bruce can now hack this away. :)
* Externalize the declaration of dc_list. This is required in order tojoerg1996-06-121-2/+2
| | | | get a ``generic'' kernel (``config kernel swap generic'') to compile.
* Clean up -Wunused warnings.gpalmer1996-06-1214-40/+26
| | | | Reviewed by: bde
* Change the symbol name used in the last commit from USRSTACK todyson1996-06-111-1/+1
| | | | | VM_MAXUSER_ADDRESS. Even though they are the same, the new name is more descriptive.
* Get rid of the unneeded upper address space.dyson1996-06-111-2/+2
|
* Implemented 'kern_sysctl', which differs from 'userland_sysctl' in thatnate1996-06-101-5/+63
| | | | | | | | | | | | it assumes all of the data exists in the kernel. Also, fix sysctl_new-kernel (unused until now) which had reversed operands to bcopy(). Reviewed by: phk Poul writes: ... actually the lock/sleep/wakeup cruft shouldn't be needed in the kernel version I think, but just leave it there for now.
* Updated some comments in settimeofday().bde1996-06-081-3/+15
|
* Fixed accumulation of run time for processes that don't accumulatebde1996-06-081-7/+5
| | | | | | | | | | | any statclock ticks. Pretend that all the time up to the first statclock tick is system time. . This makes a difference mainly for benchmarks that test short-lived processes - the user and system times for processes that each lived for about 1ms only added up to about 10% of the real time even when there was very little interrupt activity. Break the printing of a quad_t variable correctly.
* Replaced some memcpy()'s by bcopy()'s.bde1996-06-081-3/+3
| | | | | | | gcc only inlines memcpy()'s whose count is constant and didn't inline these. I want memcpy() in the kernel go away so that it's obvious that it doesn't need to be optimized. Now it is only used for one struct copy in si.c.
* Fix the same problem that davidg fixed in -stable some days ago andphk1996-06-061-62/+115
| | | | restructure sysctl stuff a bit. KERN_PROC_PID now uses pfind().
* If handler function returns EAGAIN, restart operation.phk1996-06-061-3/+7
|
* Fix an error when B_MALLOC buffers are returned from the cluster readdyson1996-06-031-3/+4
| | | | | | code without the B_READ flag being set. This is a problem when the data is not cached, and the result will be a bogus attempted write. Submitted by: Kato Takenori <kato@eclogite.eps.nagoya-u.ac.jp>
* Use kmem_alloc_wait/kmem_free_wakeup() to avoid allocation failuresdg1996-06-031-5/+5
| | | | from running out of string space in the exec_map.
* Fix declaration of ps_strings.dg1996-06-031-2/+2
|
* Remove the now-unnecessary and incorrect wiring of the "other" processesdyson1996-06-021-5/+1
| | | | page table pages. The pmap layer now handles that fully.
* Keep brelse from freeing busy pages.dyson1996-05-311-2/+2
|
* Add an option "EXTRA_VNODES" to cause an extra number of vnode structurespeter1996-05-313-5/+10
| | | | | | | | | | | | | | | | to be allocated at boot time. This is an expensive option, as they consume physical ram and are not pageable etc. In certain situations, this kind of option is quite useful, especially for news servers that access a large number of directories at random and torture the name cache. Defining 5000 or 10000 extra vnodes should cut down the amount of vnode recycling somewhat, which should allow better name and directory caching etc. This is a "your mileage may vary" option, with no real indication of what works best for your machine except trial and error. Too many will cost you ram that you could otherwise use for disk buffers etc. This is based on something John Dyson mentioned to me a while ago.
* Fix a panic caused by (proc)->p_session being dereferenced for a processdg1996-05-302-10/+12
| | | | that was exiting.
* Dont allow directories to be link()ed or unlink()ed, even for rootpeter1996-05-242-14/+18
| | | | | | | | | | | | | (returns EPERM always, the errno is specified by POSIX). If you really have a desperate need to link or unlink a directory, you can use fsdb. :-) This should stop any chance of ftpd, rdist, "rm -rf", etc from bugging out and damaging the filesystem structure or loosing races with malicious users. Reviewed by: davidg, bde
* Make sure that we don't place a busy or held page onto the PQ_CACHE queue.dyson1996-05-241-2/+5
|
* Change the *evil* allocation of memory from kmem_map to the kernel_map.dyson1996-05-241-3/+3
| | | | This will mess things up especially recently.
* Minor performance improvement to kern_malloc.c that increases thedyson1996-05-181-1/+17
| | | | | probability of reuse of recently freed memory. This improves cache hit stats on cached memory, and improves at least fork speed consistancy.
* This set of commits to the VM system does the following, and containdyson1996-05-183-32/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | contributions or ideas from Stephen McKay <syssgm@devetir.qld.gov.au>, Alan Cox <alc@cs.rice.edu>, David Greenman <davidg@freebsd.org> and me: More usage of the TAILQ macros. Additional minor fix to queue.h. Performance enhancements to the pageout daemon. Addition of a wait in the case that the pageout daemon has to run immediately. Slightly modify the pageout algorithm. Significant revamp of the pmap/fork code: 1) PTE's and UPAGES's are NO LONGER in the process's map. 2) PTE's and UPAGES's reside in their own objects. 3) TOTAL elimination of recursive page table pagefaults. 4) The page directory now resides in the PTE object. 5) Implemented pmap_copy, thereby speeding up fork time. 6) Changed the pv entries so that the head is a pointer and not an entire entry. 7) Significant cleanup of pmap_protect, and pmap_remove. 8) Removed significant amounts of machine dependent fork code from vm_glue. Pushed much of that code into the machine dependent pmap module. 9) Support more completely the reuse of already zeroed pages (Page table pages and page directories) as being already zeroed. Performance and code cleanups in vm_map: 1) Improved and simplified allocation of map entries. 2) Improved vm_map_copy code. 3) Corrected some minor problems in the simplify code. Implemented splvm (combo of splbio and splimp.) The VM code now seldom uses splhigh. Improved the speed of and simplified kmem_malloc. Minor mod to vm_fault to avoid using pre-zeroed pages in the case of objects with backing objects along with the already existant condition of having a vnode. (If there is a backing object, there will likely be a COW... With a COW, it isn't necessary to start with a pre-zeroed page.) Minor reorg of source to perhaps improve locality of ref.
* Ups, I removed NMB_INIT too.phk1996-05-121-1/+3
| | | | Complained about by: asami
* Nail down NCL_INIT = 1, and put a comment there telling what it is.phk1996-05-111-8/+4
|
* Hide options for emulators and static file systems in opt_dontuse.h.bde1996-05-112-4/+4
| | | | | These options only apply at config time. Using them at compile time would break the corresponding lkms.
* Allocate mbufs from a separate submap so that NMBCLUSTERS works aswollman1996-05-103-13/+17
| | | | expected.
* Make it possible to return more than one piece of control informationwollman1996-05-092-12/+27
| | | | | | | | (PR #1178). Define a new SO_TIMESTAMP socket option for datagram sockets to return packet-arrival timestamps as control information (PR #1179). Submitted by: Louis Mamakos <loiue@TransSys.com>
* Correct a comment. There is no fn `kprintf'gpalmer1996-05-091-2/+2
|
* Our new-old mbugf allocator. This is actually something of a blast fromwollman1996-05-081-1/+103
| | | | | | | | | the past, since it returns to the old system of allocating mbufs out of a private area rather than using the kernel malloc(). While this may seem like a backwards step to some, the new allocator is some 20% faster than the old one and has much better caching properties. Written by: John Wroclawski <jtw@lcs.mit.edu>
* Clean up various compiler warnings. Most (if not all) were benigngpalmer1996-05-083-7/+9
| | | | Reviewed by: bde
* An old typo MCLBYTES/CLBYTES became more obvious bogus now.phk1996-05-061-3/+3
| | | | Submitted by: wollman
* uninitialized auto variable shmseg is used in ...joerg1996-05-051-2/+2
| | | | | | Closes PR #kern/1174 Submitted by: enami@ba2.so-net.or.jp
* Another sweep over the pmap/vm macros, this time with more focus onphk1996-05-032-15/+13
| | | | | the usage. I'm not satisfied with the naming, but now at least there is less bogus stuff around.
* disksort() is gone, all drivers now use tqdisksort().phk1996-05-031-72/+1
|
* removed:phk1996-05-026-21/+21
| | | | | | | | | CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei() ptei() kvtopte() ptetov() ispt() ptetoav() &c &c new: NPDEPG Major macro cleanup.
* Fix a nasty bug that causes random crashes and lockups particularly onpeter1996-05-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | very busy servers (eg: news, web). This is an interaction between embryonic processes that have not yet finished forking, and happen to cause the kernel VM space to grow, hitting the uninitialised variable. It was possible for this to strike at any time, depending on the size of your kernel and load patterns. One machine had paniced occasionally when cron launches a job since before the 2.1 release. If you had "options DIAGNOSTIC", you may have seen references to bogus addresses like 0xdeadc142 and the like. This is a minimal change to fix the problem, it will probably be done better by reordering p_vmspace to be in the startzero section, but it becomes harder to validate then. It's been vulnerable since pmap.c rev 1.40 (Jan 9, 1995), so it's been a cause of problems since well before 2.0.5. This was when the merged VM/buffer cache and the dynamic growing kernel VM space were first committed. This probably fixes a few of PR's.
* First pass at cleaning up macros relating to pages, clusters and all that.phk1996-05-024-23/+21
|
* KGDB is dead. It may come back one day if somebody does it.phk1996-05-021-10/+4
|
* Removed unused #include.bde1996-05-011-2/+1
|
* Removed unnecessary #includes from <sys/imgact.h> so that it isbde1996-05-016-7/+17
| | | | self-sufficient and added explicit #includes where required.
* Fixed two typos in the comment.smpatel1996-04-291-2/+2
| | | | Pointed out by: davidg
* Yet more b_flags fixes. The previous ones broke the clearing of B_DONEbde1996-04-191-1/+5
| | | | | | | and B_READ before writing. This was was fatal. They also broke the clearing of B_INVAL before doing i/o. This didn't actually matter. Submitted by: mostly by joerg
OpenPOWER on IntegriCloud