summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* Restore layout of struct vm_map_entry after r321717, same as was donekib2017-07-301-0/+1
| | | | | | in r320889 for stable/11. Sponsored by: The FreeBSD Foundation
* Merge MAP_GUARD.kib2017-07-305-258/+284
| | | | | | | | MFC r316687 (by markj), r320314, r320317, r320338, r320339, r320344, r320430, r320560 (by alc), r320801, r320843, r321173, r321230. Tested by: pho Sponsored by: The FreeBSD Foundation
* MFC r321371:kib2017-07-291-28/+30
| | | | Do not allocate struct kinfo_vmobject on stack.
* MFC r320498alc2017-07-221-8/+6
| | | | | | | | | | | Clear the MAP_WIREFUTURE flag on the vm map in exec_new_vmspace() when it recycles the current vm space. Otherwise, an mlockall(MCL_FUTURE) could still be in effect on the process after an execve(2), which violates the specification for mlockall(2). It's pointless for vm_map_stack() to check the MEMLOCK limit. It will never be asked to wire the stack. Moreover, it doesn't even implement wiring of the stack.
* MFC r320332:kib2017-07-021-3/+3
| | | | Style.
* MFC r320049alc2017-07-011-1/+1
| | | | | | Pages that are passed to swap_pager_putpages() should already be fully dirty. Assert that they are fully dirty rather than redundantly calling vm_page_dirty() on them.
* MFC r320181alc2017-07-011-1/+0
| | | | Eliminate an unused macro.
* MFC r319605alc2017-07-011-4/+3
| | | | | The variable "breakout" is used like a Boolean, so actually define it as one.
* MFC r320316:kib2017-07-011-4/+4
| | | | Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread.
* MFC r281771alc2017-06-281-2/+1
| | | | Eliminate an unused variable.
* MFC r281720alc2017-06-281-2/+0
| | | | Eliminate an unused variable.
* MFC r320202:kib2017-06-281-3/+4
| | | | | Call pmap_copy() only for map entries which have the backing object instantiated.
* MFC r320201:kib2017-06-281-0/+2
| | | | | Assert that the protection of a new map entry is a subset of the max protection.
* MFC 313186, 319702: Account for overhead of page structures when sizing page ↵jhb2017-06-211-43/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | array. 313186: Over the years, the code and comments in vm_page_startup() have diverged in one respect. When determining how many page structures to allocate, contrary to what the comments say, the code does not account for the overhead of a page structure per page of physical memory. This revision changes the code to match the comments. 319702: Fix an off-by-one error in the VM page array on some systems. r313186 changed how the size of the VM page array was calculated to be less wasteful. For most systems, the amount of memory is divided by the overhead required by each page (a page of data plus a struct vm_page) to determine the maximum number of available pages. However, if the remainder for the first non-available page was at least a page of data (so that the only memory missing was a struct vm_page), this last page was left in phys_avail[] but was not allocated an entry in the VM page array. Handle this case by explicitly excluding the page from phys_avail[]. Requested by: alc
* MFC r318995alc2017-06-151-20/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In r118390, the swap pager's approach to striping swap allocation over multiple devices was changed. However, swapoff_one() was not fully and correctly converted. In particular, with r118390's introduction of a per- device blist, the maximum swap block size, "dmmax", became irrelevant to swapoff_one()'s operation. Moreover, swapoff_one() was performing out-of- range operations on the per-device blist that were silently ignored by blist_fill(). This change corrects both of these problems with swapoff_one(), which will allow us to potentially increase MAX_PAGEOUT_CLUSTER. Previously, swapoff_one() would panic inside of blist_fill() if you increased MAX_PAGEOUT_CLUSTER. MFC r319001 After r118390, the variable "dmmax" was neither the correct strip size nor the correct maximum block size. Moreover, after r318995, it serves no purpose except to provide information to user space through a read- sysctl. This change eliminates the variable "dmmax" but retains the sysctl. It also corrects the value returned by the sysctl. MFC r319604 Halve the memory being internally allocated by the blist allocator. In short, half of the memory that is allocated to implement the radix tree is wasted because we did not change "u_daddr_t" to be a 64-bit unsigned int when we changed "daddr_t" to be a 64-bit (signed) int. (See r96849 and r96851.) MFC r319612 When the function blist_fill() was added to the kernel in r107913, the swap pager used a different scheme for striping the allocation of swap space across multiple devices. And, although blist_fill() was intended to support fill operations with large counts, the old striping scheme never performed a fill larger than the stripe size. Consequently, the misplacement of a sanity check in blst_meta_fill() went undetected. Now, moving forward in time to r118390, a new scheme for striping was introduced that maintained a blist allocator per device, but as noted in r318995, swapoff_one() was not fully and correctly converted to the new scheme. This change completes what was started in r318995 by fixing the underlying bug in blst_meta_fill() that stops swapoff_one() from simply performing a single blist_fill() operation. MFC r319627 Starting in r118390, swaponsomething() began to reserve the blocks at the beginning of a swap area for a disk label. However, neither r118390 nor r118544, which increased the reservation from one to two blocks, correctly accounted for these blocks when updating the variable "swap_pager_avail". This change corrects that error. MFC r319655 Originally, this file could be compiled as a user-space application for testing purposes. However, over the years, various changes to the kernel have broken this feature. This revision applies some fixes to get user- space compilation working again. There are no changes in this revision to code that is used by the kernel.
* MFC r315272, r315370delphij2017-05-312-0/+30
| | | | | | | | | | | | | | | | | | | | | | | r315272: Implement INHERIT_ZERO for minherit(2). INHERIT_ZERO is an OpenBSD feature. When a page is marked as such, it would be zeroed upon fork(). This would be used in new arc4random(3) functions. PR: 182610 Reviewed by: kib (earlier version) Differential Revision: https://reviews.freebsd.org/D427 r315370: The adj_free and max_free values of new_entry will be calculated and assigned by subsequent vm_map_entry_link(), therefore, remove the pointless copying. Submitted by: alc
* MFC 316493: Assert that the align parameter to uma_zcreate() is valid.jhb2017-05-111-0/+3
|
* MFC r315078: uma: fix pages <-> items conversions at several placesavg2017-04-141-6/+8
|
* MFC r286583: Avoid sign extension of value passed to kva_alloc from ↵avg2017-04-141-2/+2
| | | | | | uma_zone_reserve_kva On behalf of: zbb
* MFC r315077: uma: eliminate uk_slabsize fieldavg2017-04-142-14/+12
|
* MFC r283291: don't use CALLOUT_MPSAFE with callout_init()avg2017-03-041-1/+1
| | | | | The main purpose of this MFC is to reduce conflicts for other merges. Parts of the original change have already "trickled down" via individual MFCs.
* MFC r314272: call vm_lowmem hook in uma_reclaim_workeravg2017-03-044-4/+16
|
* MFC r314195:kib2017-03-031-4/+5
| | | | Properly handle possible underflow in vm_fault_prefault().
* MFC r313730: try to fix RACCT_RSS accountingavg2017-02-271-2/+5
|
* MFC r313693:kib2017-02-201-71/+10
| | | | Remove MPSAFE and ARGUSED annotations, ANSI-fy syscall handlers.
* MFC r313249:kib2017-02-071-2/+2
| | | | Style, use tab after #define.
* MFC 310028: Use db_lookup_proc() in the DDB 'show procvm' command.jhb2017-01-181-1/+1
| | | | This allows processes to be identified by PID as well as a pointer address.
* MFC r267546 (by alc):kib2017-01-081-77/+59
| | | | | | | | | | | | | | | | | | | | | | | | Tidy up the early parts of vm_map_insert(). MFC r267645 (by alc): When MAP_STACK_GROWS_{DOWN,UP} are passed to vm_map_insert() set the corresponding flag(s) in the new map entry. Pass MAP_STACK_GROWS_DOWN to vm_map_insert() from vm_map_growstack() when extending the stack in the downward direction. MFC r267850 (by alc): Place the check that blocks map entry coalescing on stack entries in vm_map_simplify_entry(). MFC r267917 (by alc): Delay the call to crhold() in vm_map_insert() until we know that we won't have to undo it by calling crfree(). Eliminate an unnecessary variable from vm_map_insert(). MFC r311014: Style fixes for vm_map_insert(). Tested by: pho
* MFC r310982:kib2017-01-071-36/+22
| | | | Ansify vm/vm_pager.c. Style.
* MFC r310821:kib2017-01-061-16/+22
| | | | Style.
* MFC r310834:kib2017-01-061-6/+10
| | | | | Assert that the pages found on the object queue by vm_page_next() and vm_page_prev() have correct ownership.
* MFC r310616:kib2017-01-021-10/+3
| | | | Remove redundancy in vmtotal().
* MFC r310182:kib2016-12-231-9/+9
| | | | In swp_pager_meta_free_all(), fix type of the index variable. Style.
* MFC r310098:kib2016-12-211-0/+10
| | | | Provide introductory description of the default pager.
* MFC r309709:kib2016-12-151-3/+3
| | | | Move map_generation snapshot value into struct faultstate.
* MFC r309708:kib2016-12-151-10/+4
| | | | Style.
* MFC r308733:kib2016-11-231-30/+50
| | | | | | Move the fast fault path into the separate function. Tested by: pho
* MFC r308114:kib2016-11-061-4/+4
| | | | Change remained internal uses of boolean_t to bool in vm/vm_fault.c.
* MFC r308113:kib2016-11-061-1/+0
| | | | Remove vm_pager_has_page() declaration.
* MFC r308109:kib2016-11-061-5/+2
| | | | Remove vnode_locked label and goto.
* MFC r304053, r304054:markj2016-11-052-3/+3
| | | | | | Initialize busy lock state and strengthen busy lock assertions. Tested by: Oliver Pinter
* MFC r308094:kib2016-11-051-15/+15
| | | | | | | Add unlock_vp() helper. MFC r308095 (by markj): Add one more use of unlock_vp().
* MFC r307236:markj2016-10-211-0/+2
| | | | Plug a vnode lock leak in vm_fault_hold().
* MFC r307218:kib2016-10-203-16/+16
| | | | Fix a race in vm_page_busy_sleep(9).
* MFC r307064:kib2016-10-181-1/+12
| | | | | When downgrading exclusively busied page to shared-busy state, wakeup waiters.
* MFC r305129:kib2016-09-141-9/+22
| | | | Make swapoff reliable.
* MFC r303982alc2016-08-281-11/+14
| | | | | | Correct errors and clean up the comments on the active queue scan. Eliminate some unnecessary blank lines.
* MFC r303059markj2016-08-141-3/+2
| | | | Release the second critical section in uma_zfree_arg() slightly earlier.
* MFC r303516markj2016-08-141-1/+1
| | | | Use vm_page_undirty() instead of manually setting a page field.
* MFC r303244, r303399markj2016-08-141-19/+19
| | | | De-pluralize "queues" in the pagedaemon code.
OpenPOWER on IntegriCloud