summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Make EPSON_BOUNCEDMA a new-style option.kato1998-03-171-1/+4
|
* Add missing entry to list of major device names. This list should notmsmith1998-03-171-1/+3
| | | | exist.
* Spell 'compatibility' like everyone else.msmith1998-03-161-2/+2
|
* Use dkmakeminor() rather than magic knowledge of the size and location ofmsmith1998-03-161-4/+4
| | | | | the slice field. Handle incomprehensible slice numbers slightly better. Suggested by: bde
* Be less draconian about the TSC if APM is configured, use it forphk1998-03-162-16/+62
| | | | | timecounting if APM-BIOS isn't found. Be just as draconian about SMP as always, but explain it better.
* Some VM improvements, including elimination of alot of Sig-11dyson1998-03-161-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problems. Tor Egge and others have helped with various VM bugs lately, but don't blame him -- blame me!!! pmap.c: 1) Create an object for kernel page table allocations. This fixes a bogus allocation method previously used for such, by grabbing pages from the kernel object, using bogus pindexes. (This was a code cleanup, and perhaps a minor system stability issue.) pmap.c: 2) Pre-set the modify and accessed bits when prudent. This will decrease bus traffic under certain circumstances. vfs_bio.c, vfs_cluster.c: 3) Rather than calculating the beginning virtual byte offset multiple times, stick the offset into the buffer header, so that the calculated offset can be reused. (Long long multiplies are often expensive, and this is a probably unmeasurable performance improvement, and code cleanup.) vfs_bio.c: 4) Handle write recursion more intelligently (but not perfectly) so that it is less likely to cause a system panic, and is also much more robust. vfs_bio.c: 5) getblk incorrectly wrote out blocks that are incorrectly sized. The problem is fixed, and writes blocks out ONLY when B_DELWRI is true. vfs_bio.c: 6) Check that already constituted buffers have fully valid pages. If not, then make sure that the B_CACHE bit is not set. (This was a major source of Sig-11 type problems.) vfs_bio.c: 7) Fix a potential system deadlock due to an incorrectly specified sleep priority while waiting for a buffer write operation. The change that I made opens the system up to serious problems, and we need to examine the issue of process sleep priorities. vfs_cluster.c, vfs_bio.c: 8) Make clustered reads work more correctly (and more completely) when buffers are already constituted, but not fully valid. (This was another system reliability issue.) vfs_subr.c, ffs_inode.c: 9) Create a vtruncbuf function, which is used by filesystems that can truncate files. The vinvalbuf forced a file sync type operation, while vtruncbuf only invalidates the buffers past the new end of file, and also invalidates the appropriate pages. (This was a system reliabiliy and performance issue.) 10) Modify FFS to use vtruncbuf. vm_object.c: 11) Make the object rundown mechanism for OBJT_VNODE type objects work more correctly. Included in that fix, create pager entries for the OBJT_DEAD pager type, so that paging requests that might slip in during race conditions are properly handled. (This was a system reliability issue.) vm_page.c: 12) Make some of the page validation routines be a little less picky about arguments passed to them. Also, support page invalidation change the object generation count so that we handle generation counts a little more robustly. vm_pageout.c: 13) Further reduce pageout daemon activity when the system doesn't need help from it. There should be no additional performance decrease even when the pageout daemon is running. (This was a significant performance issue.) vnode_pager.c: 14) Teach the vnode pager to handle race conditions during vnode deallocations.
* Use dsname() to generate the disk region name for the "changing rootmsmith1998-03-151-14/+14
| | | | | device to" message. Suppress this message if only the slice number has changed.
* On SMP systems, initially follow the MP spec with regard to which pintegge1998-03-142-76/+180
| | | | | | on the IOAPIC being connected to the 8254 timer interrupt. Verify that timer interrupts are delivered. If they aren't, attempt a fallback to mixed mode (i.e. routing the timer interrupt via the 8259 PIC).
* Don't use the standard macros for disabling/enabling interrupt.tegge1998-03-141-3/+3
| | | | | On SMP systems, this left the mpintr_lock simplelock locked, causing further calls to disable_intr to deadlock or panic.
* Fixed breakage of the !SMP case in vm_page_zero_idle() in thebde1998-03-121-5/+7
| | | | | | | | | previous commit. Opportunities to clean pages were often missed, and leaving of the idle state was sometimes delayed until the next interrupt (after any that occurred while cleaning). Fixed an unstaticization, a syntax error and a style bug in the previous commit.
* Don't depend on "implicit int" or bloat the data section in thebde1998-03-121-3/+3
| | | | | | declaration of mem_devsw_installed. Reduced include nesting.
* Turn "PMAP_SHPGPERPROC" into a new-style option, add it to LINT, andeivind1998-03-091-1/+2
| | | | document it there.
* "Correct behaviour" involves being consistent with the canonical names ofmsmith1998-03-091-2/+2
| | | | | other partitions. In this case, they appear in the first slice in the WHOLE_DISK_SLICE case.
* Merge from 2.2; behave correctly in the presence of a slice number thatmsmith1998-03-091-1/+4
| | | | doesn't directly correspond to the slice field in the device minor number.
* Construct the minor number for the root device taking into account themsmith1998-03-081-8/+10
| | | | | | | | | slice number passed in by the bootblocks. This means the kernel will not use the compatability slice to obtain the root filesystem when booting from a sliced disk. Use the extraction macros from reboot.h rather than stating them in full again.
* This mega-commit is meant to fix numerous interrelated problems. Theredyson1998-03-072-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | has been some bitrot and incorrect assumptions in the vfs_bio code. These problems have manifest themselves worse on NFS type filesystems, but can still affect local filesystems under certain circumstances. Most of the problems have involved mmap consistancy, and as a side-effect broke the vfs.ioopt code. This code might have been committed seperately, but almost everything is interrelated. 1) Allow (pmap_object_init_pt) prefaulting of buffer-busy pages that are fully valid. 2) Rather than deactivating erroneously read initial (header) pages in kern_exec, we now free them. 3) Fix the rundown of non-VMIO buffers that are in an inconsistent (missing vp) state. 4) Fix the disassociation of pages from buffers in brelse. The previous code had rotted and was faulty in a couple of important circumstances. 5) Remove a gratuitious buffer wakeup in vfs_vmio_release. 6) Remove a crufty and currently unused cluster mechanism for VBLK files in vfs_bio_awrite. When the code is functional, I'll add back a cleaner version. 7) The page busy count wakeups assocated with the buffer cache usage were incorrectly cleaned up in a previous commit by me. Revert to the original, correct version, but with a cleaner implementation. 8) The cluster read code now tries to keep data associated with buffers more aggressively (without breaking the heuristics) when it is presumed that the read data (buffers) will be soon needed. 9) Change to filesystem lockmgr locks so that they use LK_NOPAUSE. The delay loop waiting is not useful for filesystem locks, due to the length of the time intervals. 10) Correct and clean-up spec_getpages. 11) Implement a fully functional nfs_getpages, nfs_putpages. 12) Fix nfs_write so that modifications are coherent with the NFS data on the server disk (at least as well as NFS seems to allow.) 13) Properly support MS_INVALIDATE on NFS. 14) Properly pass down MS_INVALIDATE to lower levels of the VM code from vm_map_clean. 15) Better support the notion of pages being busy but valid, so that fewer in-transit waits occur. (use p->busy more for pageouts instead of PG_BUSY.) Since the page is fully valid, it is still usable for reads. 16) It is possible (in error) for cached pages to be busy. Make the page allocation code handle that case correctly. (It should probably be a printf or panic, but I want the system to handle coding errors robustly. I'll probably add a printf.) 17) Correct the design and usage of vm_page_sleep. It didn't handle consistancy problems very well, so make the design a little less lofty. After vm_page_sleep, if it ever blocked, it is still important to relookup the page (if the object generation count changed), and verify it's status (always.) 18) In vm_pageout.c, vm_pageout_clean had rotted, so clean that up. 19) Push the page busy for writes and VM_PROT_READ into vm_pageout_flush. 20) Fix vm_pager_put_pages and it's descendents to support an int flag instead of a boolean, so that we can pass down the invalidate bit.
* The APs now reload the interrupt descriptor table pointer aftertegge1998-03-074-4/+21
| | | | | | | | | f00f_hack has run. Use the global r_idt descriptor in f00f_hack when in SMP mode, so the APs find the relocated interrupt descriptor table. Submitted by: Partially from David A Adkins <adkin003@tc.umn.edu>
* Remove special handling for resuming clock interrupt when using APIC_IO.tegge1998-03-055-37/+18
| | | | The `generic' vector stubs do the right thing.
* Use t_idt instead of idt inside setidt() if f00f_hack() has relocated the IDT.tegge1998-03-051-2/+7
| | | | Submitted by: Bruce Evans <bde@zeta.org.au>
* Defined CCR6 and CCR7 (configuration registers of M2 CPU.)kato1998-03-041-1/+5
|
* Reviewed by: msmith, bde long agodufault1998-03-042-6/+26
| | | | Fix for RTPRIO scheduler to eliminate invalid context switches.
* When entering the apic version of slow interrupt handler, leveltegge1998-03-038-69/+544
| | | | | | | | | interrupts are masked, and EOI is sent iff the corresponding ISR bit is set in the local apic. If the CPU cannot obtain the interrupt service lock (currently the global kernel lock) the interrupt is forwarded to the CPU holding that lock. Clock interrupts now have higher priority than other slow interrupts.
* Forward the signal if the process runs on a different CPU. This reducestegge1998-03-036-17/+174
| | | | | | | | the signal handling latency for cpu-bound processes that performs very few system calls. The IPI for forcing an additional software trap is no longer dependent upon BETTER_CLOCK being defined.
* Reduce timeout before assuming that forwarding of hardclock or softclocktegge1998-03-033-21/+33
| | | | | failed. Don't complain on forwarding failure, unless BETTER_CLOCK_DIAGNOSTIC is defined.
* forward_statclock and forward_hardclock are located in mp_machdep.c.tegge1998-03-031-3/+5
|
* Update the ELF image activator to use some of the exec resources ratherpeter1998-03-021-2/+2
| | | | | | | | | | | | than rolling it's own. This means that it now uses the "safe" exec_map_first_page() to get the ld.so headers rather than risking a panic on a page fault failure (eg: NFS server goes down). Since all the ELF tools go to a lot of trouble to make sure everything lives in the first page for executables, this is a win. I have not seen any ELF executable on any system where all the headers didn't fit in the first page with lots of room to spare. I have been running variations of this code for some time on my pure ELF systems.
* 1) Use a more consistent page wait methodology.dyson1998-03-014-39/+17
| | | | | | | | | | | | | 2) Do not unnecessarily force page blocking when paging pages out. 3) Further improve swap pager performance and correctness, including fixing the paging in progress deadlock (except in severe I/O error conditions.) 4) Enable vfs_ioopt=1 as a default. 5) Fix and enable the page prezeroing in SMP mode. All in all, SMP systems especially should show a significant improvement in "snappyness."
* Prevent the TSC from being used on APM machines, we have no idea ifphk1998-02-282-4/+12
| | | | | | | | it runs at a constant frequency. This was less of an issue before, because the TSC only interpolated in the HZ intervals, but now where the timecounter is used all the way, this becomes much more visible. Nit: Fix a printf which triggered the bde-filter.
* Fix page prezeroing for SMP, and fix some potential paging-in-progressdyson1998-02-252-32/+38
| | | | | | hangs. The paging-in-progress diagnosis was a result of Tor Egge's excellent detective work. Submitted by: Partially from Tor Egge.
* Removed vestiges of previous microtime() implementation.bde1998-02-251-6/+2
|
* Try to dynamically size the VM_KMEM_SIZE (but is still able to be overriddendyson1998-02-231-2/+18
| | | | | | | | | | | | in a way identically as before.) I had problems with the system properly handling the number of vnodes when there is alot of system memory, and the default VM_KMEM_SIZE. Two new options "VM_KMEM_SIZE_SCALE" and "VM_KMEM_SIZE_MAX" have been added to support better auto-sizing for systems with greater than 128MB. Add some accouting for vm_zone memory allocations, and provide properly for vm_zone allocations out of the kmem_map. Also move the vm_zone allocation stats to the VM OID tree from the KERN OID tree.
* Quick fix for the i8254 timecounter often gaining 10 msec.bde1998-02-232-2/+4
|
* Add missing CLOCK_UNLOCK() before write_eflags().jkh1998-02-212-2/+4
| | | | Submitted by: dave adkins <adkin003@tc.umn.edu>
* Replace TOD clock code with more systematic approach.phk1998-02-203-201/+231
| | | | | | | | | | | | | | | Highlights: * Simple model for underlying hardware. * Hardware basis for timekeeping can be changed on the fly. * Only one hardware clock responsible for TOD keeping. * Provides a real nanotime() function. * Time granularity: .232E-18 seconds. * Frequency granularity: .238E-12 s/s * Frequency adjustment is continuous in time. * Less overhead for frequency adjustment. * Improves xntpd performance. Reviewed by: bde, bde, bde
* Removed unused #includes.bde1998-02-201-2/+1
|
* Remove DISABLE_PSE option which was masking (but not fixing) the problem.msmith1998-02-161-3/+1
| | | | A correct fix for execution off MFS filesystems has been committed.
* TEMPORARILY disable support for the 4MB kernel page, as it appears to bemsmith1998-02-161-1/+3
| | | | | | causing installation images for -current to be unbootable. Submitted by: phk
* Removed a superstitious fnop() that broke the usefulness of the FPU'sbde1998-02-152-4/+2
| | | | "last instruction" pointer.
* Use RDMSR instruction instead of WRMSR.kato1998-02-131-16/+16
|
* Ifdefed SMP-only declarations.bde1998-02-131-3/+8
|
* Update timer0_prescaler_count before calling hardclock() while timer0bde1998-02-132-30/+44
| | | | | | | | | | | | | | | | is "acquired". This fixes a TSC biasing error of about 10 msec when pcaudio is active. Update `time' before calling hardclock() when timer0 is being released. This is not known to be important. Added some delays in writertc(). Efficiency is not critical here, unlike in rtcin(), and we already use conservative delays there. Don't touch the hardware when machdep.i8254_freq is being changed but the maximum count wouldn't change. This fixes jitter of up to 10 msec for most small adjustments to machdep.i8254_freq. When the maximum count needs to change, the hardware should be adjusted more carefully.
* Ifdefed some npx code. npx should be optional again.bde1998-02-131-1/+3
|
* Fixed missing privilege checking and off-by-1 bounds checking inbde1998-02-131-6/+9
| | | | | | | | | i386_set_ioperm(). Don't use a magic number for the bound. Fixed missing bounds checking in i386_get_ioperm(). Don't use a magic number for the bound elsewhere in this function. Removed some bogus initializers.
* Fixed initialization of the 4MB page. Kernels larger than about 2.75MBbde1998-02-121-2/+2
| | | | | (from _btext to _end) crashed in pmap_bootstrap(). Smaller kernels worked accidentally.
* Only use the i586-optimized copying and zeroing functions if they arebde1998-02-122-6/+76
| | | | | | actually faster (more than 20% faster for zeroing 1 MB at boot time). This fixes pessimized copying and zeroing on K6's and perhaps on other CPUs that are misclassified as i586's.
* Fix warning after previous staticization.eivind1998-02-101-2/+2
|
* Staticize.eivind1998-02-0910-44/+50
|
* Remove warnings from f00f_hack.eivind1998-02-091-5/+5
|
* Back out DIAGNOSTIC changes.eivind1998-02-068-18/+8
|
* 1) Start using a cleaner and more consistant page allocator insteaddyson1998-02-052-122/+147
| | | | | | | | | | | | | | | | | | | | | | | | of the various ad-hoc schemes. 2) When bringing in UPAGES, the pmap code needs to do another vm_page_lookup. 3) When appropriate, set the PG_A or PG_M bits a-priori to both avoid some processor errata, and to minimize redundant processor updating of page tables. 4) Modify pmap_protect so that it can only remove permissions (as it originally supported.) The additional capability is not needed. 5) Streamline read-only to read-write page mappings. 6) For pmap_copy_page, don't enable write mapping for source page. 7) Correct and clean-up pmap_incore. 8) Cluster initial kern_exec pagin. 9) Removal of some minor lint from kern_malloc. 10) Correct some ioopt code. 11) Remove some dead code from the MI swapout routine. 12) Correct vm_object_deallocate (to remove backing_object ref.) 13) Fix dead object handling, that had problems under heavy memory load. 14) Add minor vm_page_lookup improvements. 15) Some pages are not in objects, and make sure that the vm_page.c can properly support such pages. 16) Add some more page deficit handling. 17) Some minor code readability improvements.
OpenPOWER on IntegriCloud