#
1399b98e |
| 17-Sep-2019 |
Doug Moore <dougm@FreeBSD.org> |
Remove dead code from vm_map_unlink_entry made dead by r351476, and also a no-longer-used enumerant.
Reviewed by: alc Approved by: markj (mentor, implicit) Tested by: pho (as part of a larger change
Remove dead code from vm_map_unlink_entry made dead by r351476, and also a no-longer-used enumerant.
Reviewed by: alc Approved by: markj (mentor, implicit) Tested by: pho (as part of a larger change) Differential Revision: https://reviews.freebsd.org/D21668
show more ...
|
#
f993ed2f |
| 09-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351732 through r352104.
|
#
bf5661f4 |
| 04-Sep-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
madvise(MADV_FREE): Quick fix to time rewind.
Don't free pages in a shadowing object. While this degrades MADV_FREE to a no-op (and we could, instead, choose to fall back to MADV_DONTNEED, at the c
madvise(MADV_FREE): Quick fix to time rewind.
Don't free pages in a shadowing object. While this degrades MADV_FREE to a no-op (and we could, instead, choose to fall back to MADV_DONTNEED, at the cost of changing pmap_madvise), this is presently considered a temporary fix. We may prefer to risk a little fragmentation of the map by creating a zero/OBJT_DEFAULT entry over top of the existing object and, simultaneously, revert to the existing marking any pages in the former shadowing object in the advised region as reclaimable. At least one consumer of MADV_FREE (snmalloc) may use mmap() to construct zeroed pages "eventually" here anyway, so the fragmentation may be coming anyway.
Submitted by: Nathaniel Filardo <nwf20@cl.cam.ac.uk> PR: 240061 Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21517
show more ...
|
#
fe7bcbaf |
| 03-Sep-2019 |
Kyle Evans <kevans@FreeBSD.org> |
vm pager: writemapping accounting for OBJT_SWAP
Currently writemapping accounting is only done for vnode_pager which does some accounting on the underlying vnode.
Extend this to allow accounting to
vm pager: writemapping accounting for OBJT_SWAP
Currently writemapping accounting is only done for vnode_pager which does some accounting on the underlying vnode.
Extend this to allow accounting to be possible for any of the pager types. New pageops are added to update/release writecount that need to be implemented for any pager wishing to do said accounting, and we implement these methods now for both vnode_pager (unchanged) and swap_pager.
The primary motivation for this is to allow other systems with OBJT_SWAP objects to check if their objects have any write mappings and reject operations with EBUSY if so. posixshm will be the first to do so in order to reject adding write seals to the shmfd if any writable mappings exist.
Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D21456
show more ...
|
#
fe69291f |
| 03-Sep-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
Add procctl(PROC_STACKGAP_CTL)
It allows a process to request that stack gap was not applied to its stacks, retroactively. Also it is possible to control the gaps in the process after exec.
PR: 23
Add procctl(PROC_STACKGAP_CTL)
It allows a process to request that stack gap was not applied to its stacks, retroactively. Also it is possible to control the gaps in the process after exec.
PR: 239894 Reviewed by: alc Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D21352
show more ...
|
#
c5c3ba6b |
| 03-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351317 through r351731.
|
#
83ea714f |
| 25-Aug-2019 |
Doug Moore <dougm@FreeBSD.org> |
vm_map_simplify_entry considers merging an entry with its two neighbors, and is used in a way so that if entries a and b cannot be merged, we consider them twice, first not-merging a with its success
vm_map_simplify_entry considers merging an entry with its two neighbors, and is used in a way so that if entries a and b cannot be merged, we consider them twice, first not-merging a with its successor b, and then not-merging b with its predecessor a. This change replaces vm_map_simplify_entry with vm_map_try_merge_entries, which compares two adjacent entries only, and uses it to avoid duplicated merge-checks.
Tested by: pho Reviewed by: alc Approved by: markj (implicit) Differential Revision: https://reviews.freebsd.org/D20814
show more ...
|
#
a7751d32 |
| 24-Aug-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
Make stack grow use the same gap as stack create.
Store stack_guard_page * PAGE_SIZE into the gap->next_read field at the time of the stack creation. This makes the used guard size consistent betwe
Make stack grow use the same gap as stack create.
Store stack_guard_page * PAGE_SIZE into the gap->next_read field at the time of the stack creation. This makes the used guard size consistent between stack creation and stack grow time.
Suggested by: alc Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21384
show more ...
|
#
bb9e2184 |
| 18-Aug-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
Change locking requirements for VOP_UNSET_TEXT().
Require the vnode to be locked for the VOP_UNSET_TEXT() call. This will be used by the following bug fix for a tmpfs issue.
Tested by: sbruno, pho
Change locking requirements for VOP_UNSET_TEXT().
Require the vnode to be locked for the VOP_UNSET_TEXT() call. This will be used by the following bug fix for a tmpfs issue.
Tested by: sbruno, pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
10ae16c7 |
| 08-Aug-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
Fix stack grow for init.
During early stages of kern_exec(), including strings copyout, p_textvp for init is NULL. This prevented stack grow from working for init execution.
Without stack gap enab
Fix stack grow for init.
During early stages of kern_exec(), including strings copyout, p_textvp for init is NULL. This prevented stack grow from working for init execution.
Without stack gap enabled, initial stack segment size is enough for strings passed by kernel to init. With the gap enabled, the used address might fall out of the initial segment, which kills init.
Exclude initproc from the check for contexts which should not cause stack grow in the target map.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
a63915c2 |
| 28-Jul-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @r350386
Sponsored by: The FreeBSD Foundation
|
#
312df2c1 |
| 19-Jul-2019 |
Doug Moore <dougm@FreeBSD.org> |
Define vm_map_entry_in_transition to handle an in-transition map entry, combining code currently in vm_map_unwire and vm_map_wire_locked into a single function, called by each of them for entries in
Define vm_map_entry_in_transition to handle an in-transition map entry, combining code currently in vm_map_unwire and vm_map_wire_locked into a single function, called by each of them for entries in transition.
Discussed with: kib, markj Reviewed by: alc Approved by: kib, markj (mentors, implicit) Tested by: pho Differential Revision: https://reviews.freebsd.org/D20833
show more ...
|
Revision tags: release/11.3.0 |
|
#
d2860f22 |
| 04-Jul-2019 |
Doug Moore <dougm@FreeBSD.org> |
Move an assignment, drop a label, and change gotos to break statements in vm_map_unwire. The code generated on amd86 is unchanged.
Approved by: markj (mentor) Differential Revision: https://reviews.
Move an assignment, drop a label, and change gotos to break statements in vm_map_unwire. The code generated on amd86 is unchanged.
Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20850
show more ...
|
#
b71f9b0d |
| 04-Jul-2019 |
Doug Moore <dougm@FreeBSD.org> |
Replace a 'goto' with an 'else' in vm_map_wire_locked.
Reviewed by: alc Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20855
|
#
9a0cdf94 |
| 04-Jul-2019 |
Doug Moore <dougm@FreeBSD.org> |
Change boolean_t variables in vm_map_unwire and vm_map_wire_locked to bool. Drop result variable. Add holes_ok bool to replace repeated masking of flags parameter.
Approved by: markj (mentor) Differ
Change boolean_t variables in vm_map_unwire and vm_map_wire_locked to bool. Drop result variable. Add holes_ok bool to replace repeated masking of flags parameter.
Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20846
show more ...
|
#
723413be |
| 04-Jul-2019 |
Doug Moore <dougm@FreeBSD.org> |
Drop a temp variable from vm_map_insert, with no effect on the resulting amd64 machine code.
Reviewed by: alc Approved by: kib, markj (mentors, implicit) Differential Revision: https://reviews.freeb
Drop a temp variable from vm_map_insert, with no effect on the resulting amd64 machine code.
Reviewed by: alc Approved by: kib, markj (mentors, implicit) Differential Revision: https://reviews.freebsd.org/D20849
show more ...
|
#
38e220e8 |
| 04-Jul-2019 |
Doug Moore <dougm@FreeBSD.org> |
Eliminate a goto and a label in vm_map_wire_locked by inserting an 'else'.
Reviewed by: alc Approved by: kib, markj (mentors, implicit) Differential Revision: https://reviews.freebsd.org/D20845
|
#
5201cbab |
| 30-Jun-2019 |
Doug Moore <dougm@FreeBSD.org> |
Remove a call to vm_map_simplify_entry from _vm_map_clip_start. Recent changes to vm_map_protect have made it unnecessary.
Reviewed by: alc Approved by: kib (mentor) Tested by: pho Differential Revi
Remove a call to vm_map_simplify_entry from _vm_map_clip_start. Recent changes to vm_map_protect have made it unnecessary.
Reviewed by: alc Approved by: kib (mentor) Tested by: pho Differential Revision: https://reviews.freebsd.org/D20633
show more ...
|
#
a72dce34 |
| 28-Jun-2019 |
Doug Moore <dougm@FreeBSD.org> |
If vm_map_protect fails with KERN_RESOURCE_SHORTAGE, be sure to simplify modified entries before returning.
Reviewed by: alc, markj (earlier version), kib (earlier version) Approved by: kib, markj (
If vm_map_protect fails with KERN_RESOURCE_SHORTAGE, be sure to simplify modified entries before returning.
Reviewed by: alc, markj (earlier version), kib (earlier version) Approved by: kib, markj (mentors, implicit) Differential Revision: https://reviews.freebsd.org/D20753
show more ...
|
#
7f49ce7a |
| 28-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349476
Sponsored by: The FreeBSD Foundation
|
#
d1d3f7e1 |
| 26-Jun-2019 |
Doug Moore <dougm@FreeBSD.org> |
Revert r349393, which leads to an assertion failure on bootup, in vm_map_stack_locked.
Reported by: ler@lerctr.org Approved by: kib, markj (mentors, implicit)
|
#
52499d17 |
| 25-Jun-2019 |
Doug Moore <dougm@FreeBSD.org> |
Eliminate some uses of the prev and next fields of vm_map_entry_t.
Since the only caller to vm_map_splay is vm_map_lookup_entry, move the implementation of vm_map_splay into vm_map_lookup_helper, ca
Eliminate some uses of the prev and next fields of vm_map_entry_t.
Since the only caller to vm_map_splay is vm_map_lookup_entry, move the implementation of vm_map_splay into vm_map_lookup_helper, called by vm_map_lookup_entry.
vm_map_lookup_entry returns the greatest entry less than or equal to a given address, but in many cases the caller wants the least entry greater than or equal to the address and uses the next pointer to get to it. Provide an alternative interface to lookup, vm_map_lookup_entry_ge, to provide the latter behavior, and let callers use one or the other rather than having them use the next pointer after a lookup miss to get what they really want.
In vm_map_growstack, the caller wants an entry that includes a given address, and either the preceding or next entry depending on the value of eflags in the first entry. Incorporate that behavior into vm_map_lookup_helper, the function that implements all of these lookups.
Eliminate some temporary variables used with vm_map_lookup_entry, but inessential.
Reviewed by: markj (earlier version) Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20664
show more ...
|
#
18cd8bb8 |
| 25-Jun-2019 |
Doug Moore <dougm@FreeBSD.org> |
vm_map_protect may return an INVALID_ARGUMENT or PROTECTION_FAILURE error response after clipping the first map entry in the region to be reserved. This creates a pair of matching entries that should
vm_map_protect may return an INVALID_ARGUMENT or PROTECTION_FAILURE error response after clipping the first map entry in the region to be reserved. This creates a pair of matching entries that should have been "simplified" back into one, or never created. This change defers the clipping of that entry until those two vm_map_protect failure cases have been ruled out.
Reviewed by: alc Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20711
show more ...
|
#
e532a999 |
| 20-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349234
Sponsored by: The FreeBSD Foundation
|
#
4766eba1 |
| 15-Jun-2019 |
Doug Moore <dougm@FreeBSD.org> |
Critical comments were lost in r349203. This patch seeks to restore the lost information in new comments.
Reported by: alc Reviewed by: alc Approved by: kib (mentor) Differential Revision: https://r
Critical comments were lost in r349203. This patch seeks to restore the lost information in new comments.
Reported by: alc Reviewed by: alc Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20632
show more ...
|