| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to increased parallelism and optimizations in several parts of the
system, the previously latent bugs in VM become much easier to trigger,
affecting a significant number of the FreeBSD users. The exact technical
details of the issues are provided in the commit messages of the merged
revisions, which are listed below with short summaries.
r301184 prevent parallel object collapses, fixes object lifecycle
r301436 do not leak the vm object lock, fixes overcommit disable
r302243 avoid the active object marking for vm.vmtotal sysctl, fixes
"vodead" hangs
r302513 vm_fault() race with the vm_object_collapse(), fixes spurious
SIGSEGV
r303291 postpone BO_DEAD, fixes panic on fast vnode reclaim
Approved by: so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Export various helper variables describing the layout and size of
certain kernel structures for use by debuggers. This mostly aids
in examining cores from a kernel without debug symbols as a debugger
can infer these values if debug symbols are available.
One set of variables describes the layout of 'struct linker_file' to
walk the list of loaded kernel modules.
A second set of variables describes the layout of 'struct proc' and
'struct thread' to walk the list of processes in the kernel and the
threads in each process.
The 'pcb_size' variable is used to index into the stoppcbs[] array.
The 'vm_maxuser_address' is used to distinguish kernel virtual addresses
from user addresses. This doesn't have to be perfect, and
'vm_maxuser_address' is a cheap and simple way to differentiate kernel
pointers from simple values like TIDs and PIDs.
While here, annotate the fields in struct pcb used by kgdb on amd64
and i386 to note that their ABI should be preserved. Annotations for
other platforms will be added in the future.
|
|
|
|
|
| |
Handle invalid pages found during the sleepable collapse scan, do not free
the shadow page swap space. Combine the sleep code.
|
|
|
|
|
| |
In vm_pageout_grow_cache(), do not re-try the inactive queue when
active queue scan initiated write, to avoid infinite loop.
|
|
|
|
|
| |
Raise OOM when pagedaemon is unable to produce a free page in several
back-to-back passes.
|
|
|
|
|
|
| |
Provide the OOM-specific vm_pageout_oom_pagecount() function which
estimates the amount of reclamaible memory which could be stolen if
the process is killed.
|
|
|
|
|
| |
Do not skip a process which has inhibited thread due to the swap-out,
in the OOM selection loop.
|
|
|
|
|
|
|
|
|
|
| |
Minor cleanup.
Systematically use ANSI C functions definitions.
Correct type of the flags argument to the dev_pager_putpages() function.
vm_pager_free_nonreq() does not exist in stable/10, this part is not
merged.
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce the amount of calls to VOP_BMAP() made from the local vnode
pager.
MFC r291157, r291158:
Include the pages before/after the requested page, that fit into the
reqblock, into the calculation of the size of run of pages.
Tested by: pho
|
|
|
|
| |
Remove weighted page handling from vm_page_advise().
|
|
|
|
|
| |
Modify the 'unchanged' calculation bu dereferencing the marker tailq
pointers, which is known to belong to the queue.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The conversion of kmem_alloc_attr() from operating on a vm map to a vmem
arena in r254025 introduced a bug in the case when an allocation is only
partially successful. Specifically, the vm object lock was not being
acquired before freeing the allocated pages. To address this bug, replace
the existing code by a call to kmem_unback().
Change the type of a variable in kmem_alloc_attr() so that an allocation
of two or more gigabytes won't fail.
Replace the error handling code in kmem_back() by a call to kmem_unback().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide vnode in memory map info for files on tmpfs
When providing memory map information to userland, populate the vnode pointer
for tmpfs files. Set the memory mapping to appear as a vnode type, to match
FreeBSD 9 behavior.
This fixes the use of tmpfs files with the dtrace pid provider,
procstat -v, procfs, linprocfs, pmc (pmcstat), and ptrace (PT_VM_ENTRY).
Submitted by: Eric Badger <eric@badgerio.us> (initial revision)
Obtained from: Dell Inc.
PR: 198431
|
|
|
|
|
|
| |
Export a list of VM objects in the system via a sysctl. The list can be
examined via 'vmstat -o'. It can be used to determine which files are
using physical pages of memory and how much each is using.
|
|
|
|
|
|
| |
There is no reason to perform the pmap_remove() on the kernel pmap while
the kmem object lock is held. Do the pmap_remove() before acquiring the
kmem object lock.
|
|
|
|
| |
Document vm_page_alloc_contig()'s support for the VM_ALLOC_NODUMP option.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct a non-fatal error in vm_pageout_worker(). vm_pageout_worker()
should not assume that vm_pages_needed will remain set while it sleeps.
Other threads can clear vm_pages_needed by performing a sufficient
number of vm_page_free() calls, e.g., process termination. The effect
of this error was that vm_pageout_worker() would free and/or launder
pages when, in fact, there was no shortage of free pages.
Rewrite a nearby comment to describe all of the possible cases and not
just the most common case. The problem being that the comment made
the most common case seem like the only case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The intention of r254304 was to scan the active queue continuously.
However, I've observed the active queue scan stopping when there are
frequent free page shortages and the inactive queue is steadily refilled
by other mechanisms, such as the sequential access heuristic in vm_fault()
or madvise(2). To remedy this problem, record the time of the last active
queue scan, and always scan a number of pages proportional to the time
since the last scan, regardless of whether that last scan was a
timeout-triggered ("pass == 0") or free-page-shortage-triggered ("pass >
0") scan.
Also, on a timeout-triggered scan, allow a full scan of the active queue
when the system is short of inactive pages.
|
|
|
|
| |
Testing whether a page is dirty does not require the page lock.
|
|
|
|
| |
Avoid pmap_is_modified() on pages that can't be mapped.
|
|
|
|
| |
Eliminate (many) unnecessary calls to pmap_remove_all().
|
|
|
|
|
|
|
|
|
|
|
| |
Fix integer truncation bug in malloc(9)
A couple of internal functions used by malloc(9) and uma truncated
a size_t down to an int. This could cause any number of issues
(e.g. indefinite sleeps, memory corruption) if any kernel
subsystem tried to allocate 2GB or more through malloc. zfs would
attempt such an allocation when run on a system with 2TB or more
of RAM.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prevent ticks rollover from preventing vm_lowmem event
Currently vm_pageout_scan() uses a ticks-based scheme to rate-limit
the number of times that the vm_lowmem event will happen. However
if no events happen for long enough for ticks to roll over, this
leaves us in a long window in which vm_lowmem events will not
happen.
Replace the use of ticks with time_t to prevent rollover from ever
being an issue.
Reviewed by: ian
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3439
|
|
|
|
|
|
|
|
|
|
| |
r287567 | imp | 2015-09-08 11:47:56 -0600 (Tue, 08 Sep 2015) | 16 lines
Mark the swap pager as direct dispatch compatible.
r281310 | mav | 2015-04-09 07:09:05 -0600 (Thu, 09 Apr 2015) | 4 lines
Remove sleeps from geom_up thread on device destruction.
|
|
|
|
|
| |
There is no reason in the current kernel to disallow write access to
the COW wired entry if the entry permissions allow it. Remove the check.
|
|
|
|
| |
Do not pretend that vm_fault(9) supports unwiring the address.
|
|
|
|
|
| |
Account for the main process stack being one page below the highest
user address when ABI uses shared page.
|
|
|
|
|
|
| |
Revert r173708's modifications to vm_object_page_remove().
This fixes inconsistencies encountered by vm_object_unwire() or
by the buffer cache when the file is truncated.
|
|
|
|
|
|
|
| |
Correct a type error in kmem_unback().
Requested by: alc
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
|
| |
Make the creation of the free lists dynamic, i.e., it is based on the
available physical memory at boot time. For amd64 systems with 64 GB
or more of physical memory, create free lists for managing pages with
physical addresses below 4 GB.
PR: 185727
Requested by: alc
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add kern.racct.enable tunable and RACCT_DISABLED config option.
The point of this is to be able to add RACCT (with RACCT_DISABLED)
to GENERIC, to avoid having to rebuild the kernel to use rctl(8).
MFC r282901:
Build GENERIC with RACCT/RCTL support by default. Note that it still
needs to be enabled by adding "kern.racct.enable=1" to /boot/loader.conf.
Note those two are MFC-ed together, because the latter one changes the
name of RACCT_DISABLED option to RACCT_DEFAULT_TO_DISABLED. Should have
committed the renaming separately...
Relnotes: yes
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Place VM objects on the object list when created and never remove them.
261811:
Fix function name in KASSERT().
282660:
Place VM objects on the object list when created and never remove them.
This is ok since objects come from a NOFREE zone and allows objects to
be locked while traversing the object list without triggering a LOR.
Ensure that objects on the list are marked DEAD while free or stillborn,
and that they have a refcount of zero. This required updating most of
the pagers to explicitly mark an object as dead when deallocating it.
(Only the vnode pager did this previously.)
282706:
Satisfy vm_object uma zone destructor requirements after r282660 when
vnode object creation raced.
|
|
|
|
|
| |
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.
|
|
|
|
|
|
|
|
|
| |
Set VPO_UNMANAGED on the freed page when insertion of the page into the
object queue failed, to satisfy the assertion.
MFC r283163:
Do grammar fix in the comment to record the right commit message for
r283162.
|
|
|
|
|
| |
Call uma_reclaim() from the additional pagedaemon thread to reclaim kmem
arena address space.
|
|
|
|
|
| |
Do not sleep waiting for the MAP_ENTRY_IN_TRANSITION state ending with
the vnode locked.
|
|
|
|
|
|
|
|
| |
users, myself included. The original code is likely papering over a
larger bug that needs to be explored, but for now get things back to
a working state.
Obtained from: Netflix, Inc.
|
|
|
|
|
| |
Eliminate a variable that became unused when VFS_LOCK_GIANT() was
eliminated.
|
|
|
|
|
|
|
| |
Use flexible array for per cpu uma_cache to avoid allocating
an extra struct uma_cache.
PR: 199169
|
|
|
|
|
|
| |
Fix wrong kassert msg in uma.
PR: 199172
|
|
|
|
|
|
| |
Swap device is still reported as enabled, and system still may crash later
if some swapped-out kernel pages were lost with the device, but at least
GEOM and CAM can now release the lost disk, allowing it to be reconnected.
|
|
|
|
|
| |
Correct a typo in vm_object_backing_scan() that originated in r254141.
Specifically, change a lock acquire into a lock release.
|
|
|
|
|
|
|
| |
Fix the root cause of the "vm_reserv_populate: reserv <address> is already
promoted" panics.
PR: 198163
|
|
|
|
| |
Some minor style(9) fixes (whitespace + comment)
|
|
|
|
|
|
|
|
|
| |
Update kernel inclusions of capability.h to use capsicum.h instead; some
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.
Sponsored by: Google, Inc.
|
|
|
|
| |
Fix function name in the panic message.
|
|
|
|
|
|
|
|
|
| |
vmspace_release() may sleep if the last reference is being released,
so add a WITNESS_WARN() to catch cases where it is called with a
non-sleepable lock held.
MFC after: 1 month
Sponsored by: Sandvine Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update mtime for tmpfs files modified through memory mapping.
MFC r277969:
Update both ctime and mtime for writes to tmpfs files.
MFC r277972:
Remove single-use boolean.
MFC r278151:
Remove duplicated assignment.
|
|
|
|
| |
Avoid calling vmspace_free() while owning the process lock.
|
|
|
|
| |
Revert r263475: TDP_DEVMEMIO no longer needed.
|