| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
in r320889 for stable/11.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Do not allocate struct kinfo_vmobject on stack.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Style.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Eliminate an unused macro.
|
|
|
|
|
| |
The variable "breakout" is used like a Boolean, so actually define it as
one.
|
|
|
|
| |
Do not try to unmark MAP_ENTRY_IN_TRANSITION marked by other thread.
|
|
|
|
| |
Eliminate an unused variable.
|
|
|
|
| |
Eliminate an unused variable.
|
|
|
|
|
| |
Call pmap_copy() only for map entries which have the backing object
instantiated.
|
|
|
|
|
| |
Assert that the protection of a new map entry is a subset of the max
protection.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
| |
uma_zone_reserve_kva
On behalf of: zbb
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Properly handle possible underflow in vm_fault_prefault().
|
| |
|
|
|
|
| |
Remove MPSAFE and ARGUSED annotations, ANSI-fy syscall handlers.
|
|
|
|
| |
Style, use tab after #define.
|
|
|
|
| |
This allows processes to be identified by PID as well as a pointer address.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Ansify vm/vm_pager.c. Style.
|
|
|
|
| |
Style.
|
|
|
|
|
| |
Assert that the pages found on the object queue by vm_page_next() and
vm_page_prev() have correct ownership.
|
|
|
|
| |
Remove redundancy in vmtotal().
|
|
|
|
| |
In swp_pager_meta_free_all(), fix type of the index variable. Style.
|
|
|
|
| |
Provide introductory description of the default pager.
|
|
|
|
| |
Move map_generation snapshot value into struct faultstate.
|
|
|
|
| |
Style.
|
|
|
|
|
|
| |
Move the fast fault path into the separate function.
Tested by: pho
|
|
|
|
| |
Change remained internal uses of boolean_t to bool in vm/vm_fault.c.
|
|
|
|
| |
Remove vm_pager_has_page() declaration.
|
|
|
|
| |
Remove vnode_locked label and goto.
|
|
|
|
|
|
| |
Initialize busy lock state and strengthen busy lock assertions.
Tested by: Oliver Pinter
|
|
|
|
|
|
|
| |
Add unlock_vp() helper.
MFC r308095 (by markj):
Add one more use of unlock_vp().
|
|
|
|
| |
Plug a vnode lock leak in vm_fault_hold().
|
|
|
|
| |
Fix a race in vm_page_busy_sleep(9).
|
|
|
|
|
| |
When downgrading exclusively busied page to shared-busy state, wakeup
waiters.
|
|
|
|
| |
Make swapoff reliable.
|
|
|
|
|
|
| |
Correct errors and clean up the comments on the active queue scan.
Eliminate some unnecessary blank lines.
|
|
|
|
| |
Release the second critical section in uma_zfree_arg() slightly earlier.
|
|
|
|
| |
Use vm_page_undirty() instead of manually setting a page field.
|
|
|
|
| |
De-pluralize "queues" in the pagedaemon code.
|