| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
By the time that pmap_init() runs, vm_phys_segs[] has been initialized.
Obtaining the end of memory address from vm_phys_segs[] is a little
easier than obtaining it from phys_avail[].
Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the
default on i386 PAE. (The use of VM_PHYSSEG_SPARSE on i386 PAE saves
us some precious kernel virtual address space that would have been
wasted on unused vm_page structures.)
|
|
|
|
|
| |
Provide mutual exclusion between zone allocation/destruction and
uma_reclaim().
|
|
|
|
|
| |
When the last reference on the vnode' vm object is dropped, read the
vp->v_vflag without taking vnode lock and without bypass.
|
|
|
|
|
| |
Fix mis-spelling of bits and types names in the
default_pager_putpages() and swap_pager_putpages().
|
|
|
|
|
|
|
| |
- De-vnet hash sizes and hash masks.
- Fix multiple issues related to arguments passed to SYSCTL macros.
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
|
| |
Change the UMA mutex into a rwlock
Acquire the lock in read mode when just needed to ensure the stability
of the keg list. The UMA lock may be held for a long time (relatively
speaking) in uma_reclaim() on machines with lots of zones/kegs. If the
uma_timeout() would fire during that period, subsequent callouts on that
CPU may be significantly delayed.
|
|
|
|
|
| |
Make MAP_NOSYNC handling in the vm_fault() read-locked object path
compatible with write-locked path.
|
|
|
|
| |
Add kernel option KSTACK_USAGE_PROF.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor ZFS ARC reclaim logic to be more VM cooperative
MFC r270861:
Ensure that ZFS ARC free memory checks include cached pages
MFC r272483:
Refactor ZFS ARC reclaim checks and limits
Sponsored by: Multiplay
|
|
|
|
|
|
|
|
|
| |
Remove stray uma_mtx lock/unlock in zone_drain_wait()
Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not)
the uma_mtx, but we would attempt to unlock and relock the mutex if we
had to sleep because the zone was already draining. The M_NOWAIT callers
may hold the uma_mtx, but we do not sleep in that case.
|
|
|
|
| |
Fix a boundary case error in vm_reserv_alloc_contig().
|