summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/vm_machdep.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Removed a duplicate (sloppy common-style) definition.bde1997-11-201-4/+5
| | | | Fixed some style bugs.
* Don't #include <machine/smp.h> even in the SMP case. Fixed the onebde1997-11-181-1/+4
| | | | | | | place that depended on it. The "bazillion warnings" mentioned in the log for rev.1.45 apparently aren't a problem any more. It is hard to be sure because the SIMPLELOCK_DEBUG option turns off (and breaks) things in the SMP case.
* Convert the VM86 option from a global option to an option only dependedpeter1997-10-101-1/+2
| | | | | on by the files that use it. Changing the VM86 option now only causes a recompile of a dozen files or so rather than the entire kernel.
* Revert the logic behind my last change, and use a function calledjoerg1997-09-131-5/+5
| | | | | | | `is_physical_memory()' now for the decision whether to dump some region of memory or not. Suggested by: davidg
* Do not ever try to coredump adapter memory regions.joerg1997-09-101-1/+29
| | | | | | | | | PR: 4486 Submitted by: tegge@idi.ntnu.no (Tor Egge) Implement a function is_adapter_memory() in order to determine what should nto be dumped at all. Currently, only populated with the ``ISA memory hole''. Adapter regions of other busses should be added.
* Removed unused #includes.bde1997-09-021-2/+1
|
* Clean up the SMP AP bootstrap and eliminate the wretched idle procs.peter1997-08-261-1/+13
| | | | | | | | | | | | | | | | | | | | - We now have enough per-cpu idle context, the real idle loop has been revived (cpu's halt now with nothing to do). - Some preliminary support for running some operations outside the global lock (eg: zeroing "free but not yet zeroed pages") is present but appears to cause problems. Off by default. - the smp_active sysctl now behaves differently. It's merely a 'true/false' option. Setting smp_active to zero causes the AP's to halt in the idle loop and stop scheduling processes. - bootstrap is a lot safer. Instead of sharing a statically compiled in stack a number of times (which has caused lots of problems) and then abandoning it, we use the idle context to boot the AP's directly. This should help >2 cpu support since the bootlock stuff was in doubt. - print physical apic id in traps.. helps identify private pages getting out of sync. (You don't want to know how much hair I tore out with this!) More cleanup to follow, this is more of a checkpoint than a 'finished' thing.
* VM86 kernel support.dyson1997-08-091-4/+22
| | | | | | | Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>, Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>, and probably alot of others. Submitted by: Jnathan Lemon <jlemon@americantv.com>
* Removed unused #includes.bde1997-07-201-6/+1
|
* Back out a bad commit.tegge1997-06-261-3/+1
|
* Block some interrupts during the call to pmap_zero_page integge1997-06-251-1/+3
| | | | | vm_page_zero_idle. This fixes some occurences of the problem reported in PR kern/3216: "panic: pmap_zero_page: CMAP busy"
* Preliminary support for per-cpu data pages.peter1997-06-221-8/+1
| | | | | | | | | | | | | | | | This eliminates a lot of #ifdef SMP type code. Things like _curproc reside in a data page that is unique on each cpu, eliminating the expensive macros like: #define curproc (SMPcurproc[cpunumber()]) There are some unresolved bootstrap and address space sharing issues at present, but Steve is waiting on this for other work. There is still some strictly temporary code present that isn't exactly pretty. This is part of a larger change that has run into some bumps, this part is standalone so it should be safe. The temporary code goes away when the full idle cpu support is finished. Reviewed by: fsmp, dyson
* clean up forked child creation. This is simplified also by havingpeter1997-05-071-17/+36
| | | | | | | | | | | md_regs being struct trapframe *. Do a npxsave() if needed and copy the pcb rather than use the increasingly defunct savectx(). Copy %edi and %ebp explicitly. Submitted by: bde XXX npxproc could be declared in npx.h so the externs with smp fruit are not needed.
* Use reset port before clearing page table in cpu_reset if PC98 iskato1997-04-161-10/+12
| | | | defined. Clearing page table could hang some new PC-98.
* The biggie: Get rid of the UPAGES from the top of the per-process addresspeter1997-04-071-37/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | space. (!) Have each process use the kernel stack and pcb in the kvm space. Since the stacks are at a different address, we cannot copy the stack at fork() and allow the child to return up through the function call tree to return to user mode - create a new execution context and have the new process begin executing from cpu_switch() and go to user mode directly. In theory this should speed up fork a bit. Context switch the tss_esp0 pointer in the common tss. This is a lot simpler since than swithching the gdt[GPROC0_SEL].sd.sd_base pointer to each process's tss since the esp0 pointer is a 32 bit pointer, and the sd_base setting is split into three different bit sections at non-aligned boundaries and requires a lot of twiddling to reset. The 8K of memory at the top of the process space is now empty, and unmapped (and unmappable, it's higher than VM_MAXUSER_ADDRESS). Simplity the pmap code to manage process contexts, we no longer have to double map the UPAGES, this simplifies and should measuably speed up fork(). The following parts came from John Dyson: Set PG_G on the UPAGES that are now in kernel context, and invalidate them when swapping them out. Move the upages object (upobj) from the vmspace to the proc structure. Now that the UPAGES (pcb and kernel stack) are out of user space, make rfork(..RFMEM..) do what was intended by sharing the vmspace entirely via reference counting rather than simply inheriting the mappings.
* Don't keep cpu interrupts enabled during the lookup in vm_page_zero_idle().bde1997-03-291-25/+35
| | | | | | | | Lookup isn't done every time the system goes idle now, but it can still take > 1800 instructions in the worst case, so if cpu interrupts are kept disabled then it might lose 20 characters of sio input at 115200 bps. Fixed style in vm_page_zero_idle().
* Decrease the latency/overhead in the prezero code when there isdyson1997-03-221-2/+17
| | | | an adequate number of prezeroed pages.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-1/+1
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Add code to copy the LDT, if required.se1997-01-021-1/+16
| | | | | | | | | | | | | | This code was sent to me by Bruce Evans, and seems to fix some possible kernel panic in case of an execution error. It did not cause any problems on my system, but I did never observe the problem this patch is supposed to fix, anyway. This patch is a NOP, unless the kernel is built with "options USER_LDT", and doesn't affect the GENERIC kernel for this reason. I want to have it in 2.2: it fixes a bug ... Submitted by: bde
* More merge and update.asami1996-10-301-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | (1) deleted #if 0 pc98/pc98/mse.c (2) hold per-unit I/O ports in ed_softc pc98/pc98/if_ed.c pc98/pc98/if_ed98.h (3) merge more files by segregating changes into headers. new file (moved from pc98/pc98): i386/isa/aic_98.h deleted: well, it's already in the commit message so I won't repeat the long list here ;) Submitted by: The FreeBSD(98) Development Team
* Move much of the machine dependent code from vm_glue.c intodyson1996-10-151-3/+2
| | | | | pmap.c. Along with the improved organization, small proc fork performance is now about 5%-10% faster.
* Essentially rename pmap_update to be invltlb. It is a very machinedyson1996-09-281-2/+2
| | | | | | | dependent operation, and not really a correct name. invltlb and invlpg are more descriptive, and in the case of invlpg, a real opcode. Additionally, fix the tlb management code for 386 machines.
* Addition of page coloring support. Various levels of coloring are afforded.dyson1996-09-081-5/+9
| | | | | | The default level works with minimal overhead, but one can also enable full, efficient use of a 512K cache. (Parameters can be generated to support arbitrary cache sizes also.)
* Don't use NULL in non-pointer contexts.bde1996-07-121-3/+3
|
* Properly account for non-page aligned buffers.dg1996-06-201-3/+4
|
* Minor KNF formatting change to vmapbuf() and vunmapbuf().dg1996-06-201-13/+9
|
* Clean up vmapbuf and vunmapbuf significantly. The previous code wasdyson1996-06-191-49/+16
| | | | very rough.
* This set of commits to the VM system does the following, and containdyson1996-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* removed:phk1996-05-021-2/+2
| | | | | | | | | CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei() ptei() kvtopte() ptetov() ispt() ptetoav() &c &c new: NPDEPG Major macro cleanup.
* First pass at cleaning up macros relating to pages, clusters and all that.phk1996-05-021-21/+21
|
* Fix cpu_fork for real.phk1996-04-251-7/+6
| | | | Suggested by: bde
* Fix a bogon. cpu_fork & savectx ecpected cpu_switch to restore %eax,phk1996-04-181-2/+4
| | | | they shouldn't.
* Removed never-used #includes of <machine/cpu.h>. Many were apparentlybde1996-04-071-2/+1
| | | | copied from bad examples.
* USER_LDT changes for the Willows TwinXPDK toolkit. Only tested with WINEjkh1996-03-031-1/+14
| | | | | | | since that's the only other USER_LDT using code that I know of. Submitted by: Gary Jennejohn <Gary.Jennejohn@munich.netsurf.de> Obtained from: {Origin of diffs may be someone else - I only rec'd them from Gary}
* Unspam my changes in rev 1.54 that John spammed in rev 1.55.dg1996-02-051-9/+11
|
* Changed vm_fault_quick in vm_machdep.c to be global. Needed fordyson1996-02-041-13/+9
| | | | new pipe code.
* Rewrote cpu_fork so that it doesn't use pmap_activate, and removeddg1996-02-041-9/+11
| | | | | | | pmap_activate since it's not used anymore. Changed cpu_fork so that it uses one line of inline assembly rather than calling mvesp() to get the current stack pointer. Removed mvesp() since it is no longer being used.
* savectx() strikes again: the saved stack pointer wasn't properly adjusteddg1996-01-301-11/+3
| | | | | to remove the return address. It's only the frame pointer and luck that allowed the code to work at all.
* Simplified savectx() a little and fixed a bug that caused it to returndg1996-01-231-2/+2
| | | | | | garbage in the child process rather than "1" like it is supposed to. Reviewed by: bde
* Eliminated many redundant vm_map_lookup operations for vm_mmap.dyson1996-01-191-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish overhead for merged cache. Efficiency improvement for vfs_cluster. It used to do alot of redundant calls to cluster_rbuild. Correct the ordering for vrele of .text and release of credentials. Use the selective tlb update for 486/586/P6. Numerous fixes to the size of objects allocated for files. Additionally, fixes in the various pagers. Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs. Fixes in the swap pager for exhausted resources. The pageout code will not as readily thrash. Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE), thereby improving efficiency of several routines. Eliminate even more unnecessary vm_page_protect operations. Significantly speed up process forks. Make vm_object_page_clean more efficient, thereby eliminating the pause that happens every 30seconds. Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the case of filesystems mounted async. Fix a panic with busy pages when write clustering is done for non-VMIO buffers.
* Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme.wollman1996-01-051-1/+3
|
* A Major staticize sweep. Generates a couple of warnings that I'll dealphk1995-12-141-36/+4
| | | | | | with later. A number of unused vars removed. A number of unused procs removed or #ifdefed.
* Changes to support 1Tb filesizes. Pages are now named by andyson1995-12-111-1/+2
| | | | (object,index) pair instead of (object,offset) pair.
* Staticize and cleanup.phk1995-12-101-22/+23
| | | | remove a TON of #includes from machdep.
* Untangled the vm.h include file spaghetti.dg1995-12-071-2/+9
|
* Remove unused vars.phk1995-11-201-3/+3
|
* Fixed the type of vm_fault_quick() - don't convert types back and forthbde1995-11-181-9/+18
| | | | | | through bogus immediate types. Added prototypes.
* Insert zeroed pages at the head of the zero queue rather than at the tail.dg1995-10-011-2/+2
| | | | | A measurable performance improvement results from the potential for the page to be partially cached when it is eventually used.
OpenPOWER on IntegriCloud