aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/include/vmparam.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC: Add support for "superpages" on amd64 and i386. This includes adding theJohn Baldwin2009-02-261-0/+7
| | | | | | | | | | | superpage reservation system to the machine-independent VM system as well as changes to the pmap code for amd64 and i386 to support superpages. Reviewed by: alc Tested by: ps Notes: svn path=/stable/7/; revision=189075
* Change the management of cached pages (PQ_CACHE) in two fundamentalAlan Cox2007-09-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ways: (1) Cached pages are no longer kept in the object's resident page splay tree and memq. Instead, they are kept in a separate per-object splay tree of cached pages. However, access to this new per-object splay tree is synchronized by the _free_ page queues lock, not to be confused with the heavily contended page queues lock. Consequently, a cached page can be reclaimed by vm_page_alloc(9) without acquiring the object's lock or the page queues lock. This solves a problem independently reported by tegge@ and Isilon. Specifically, they observed the page daemon consuming a great deal of CPU time because of pages bouncing back and forth between the cache queue (PQ_CACHE) and the inactive queue (PQ_INACTIVE). The source of this problem turned out to be a deadlock avoidance strategy employed when selecting a cached page to reclaim in vm_page_select_cache(). However, the root cause was really that reclaiming a cached page required the acquisition of an object lock while the page queues lock was already held. Thus, this change addresses the problem at its root, by eliminating the need to acquire the object's lock. Moreover, keeping cached pages in the object's primary splay tree and memq was, in effect, optimizing for the uncommon case. Cached pages are reclaimed far, far more often than they are reactivated. Instead, this change makes reclamation cheaper, especially in terms of synchronization overhead, and reactivation more expensive, because reactivated pages will have to be reentered into the object's primary splay tree and memq. (2) Cached pages are now stored alongside free pages in the physical memory allocator's buddy queues, increasing the likelihood that large allocations of contiguous physical memory (i.e., superpages) will succeed. Finally, as a result of this change long-standing restrictions on when and where a cached page can be reclaimed and returned by vm_page_alloc(9) are eliminated. Specifically, calls to vm_page_alloc(9) specifying VM_ALLOC_INTERRUPT can now reclaim and return a formerly cached page. Consequently, a call to malloc(9) specifying M_NOWAIT is less likely to fail. Discussed with: many over the course of the summer, including jeff@, Justin Husted @ Isilon, peter@, tegge@ Tested by: an earlier version by kris@ Approved by: re (kensmith) Notes: svn path=/head/; revision=172317
* Add the machine-specific definitions for configuring the new physicalAlan Cox2007-06-041-0/+15
| | | | | | | | | memory allocator. Approved by: re Notes: svn path=/head/; revision=170277
* Eliminate some unused definitions that came from NetBSD.Alan Cox2007-05-281-19/+0
| | | | Notes: svn path=/head/; revision=170072
* Define every architecture as either VM_PHYSSEG_DENSE orAlan Cox2007-05-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | VM_PHYSSEG_SPARSE depending on whether the physical address space is densely or sparsely populated with memory. The effect of this definition is to determine which of two implementations of vm_page_array and PHYS_TO_VM_PAGE() is used. The legacy implementation is obtained by defining VM_PHYSSEG_DENSE, and a new implementation that trades off time for space is obtained by defining VM_PHYSSEG_SPARSE. For now, all architectures except for ia64 and sparc64 define VM_PHYSSEG_DENSE. Defining VM_PHYSSEG_SPARSE on ia64 allows the entirety of my Itanium 2's memory to be used. Previously, only the first 1 GB could be used. Defining VM_PHYSSEG_SPARSE on sparc64 allows USIIIi-based systems to boot without crashing. This change is a combination of Nathan Whitehorn's patch and my own work in perforce. Discussed with: kmacy, marius, Nathan Whitehorn PR: 112194 Notes: svn path=/head/; revision=169291
* Eliminate unused definitions. (They came from NetBSD.)Alan Cox2006-08-251-9/+0
| | | | | | | Discussed with: cognet, grehan, marcel Notes: svn path=/head/; revision=161628
* Rewrite ARM_USE_SMALL_ALLOC so that instead of the current behavior, it mapsOlivier Houchard2006-08-081-0/+7
| | | | | | | | | | | whole the physical memory, cached, using 1MB section mappings. This reduces the address space available for user processes a bit, but given the amount of memory a typical arm machine has, it is not (yet) a big issue. It then provides a uma_small_alloc() that works as it does for architectures which have a direct mapping. Notes: svn path=/head/; revision=161105
* Add a new arm-specific option, ARM_USE_SMALL_ALLOC. If defined, it providesOlivier Houchard2005-06-071-0/+4
| | | | | | | | an implementation of uma_small_alloc() which tries to preallocate memory 1MB per 1MB, and maps it into a section mapping. Notes: svn path=/head/; revision=147114
* Start all license statements with /*-Warner Losh2005-01-051-1/+1
| | | | Notes: svn path=/head/; revision=139735
* Define VM_PROT_READ_IS_EXEC.Olivier Houchard2004-09-231-0/+1
| | | | Notes: svn path=/head/; revision=135662
* Fix comments.Olivier Houchard2004-08-021-2/+3
| | | | | | | Spotted out by: mux Notes: svn path=/head/; revision=133011
* Import FreeBSD/arm kernel bits.Olivier Houchard2004-05-141-0/+129
It only supports sa1110 (on simics) right now, but xscale support should come soon. Some of the initial work has been provided by : Stephane Potvin <sepotvin at videotron.ca> Most of this comes from NetBSD. Notes: svn path=/head/; revision=129198