summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* MFC r282128:kib2015-05-051-0/+4
| | | | | Do not sleep waiting for the MAP_ENTRY_IN_TRANSITION state ending with the vnode locked.
* Revert r281543. It causes a panic/hang early in boot for a number ofscottl2015-04-241-1/+1
| | | | | | | | 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.
* MFC r279400alc2015-04-201-2/+0
| | | | | Eliminate a variable that became unused when VFS_LOCK_GIANT() was eliminated.
* MFC r281162, r281451:dchagin2015-04-151-1/+1
| | | | | | | Use flexible array for per cpu uma_cache to avoid allocating an extra struct uma_cache. PR: 199169
* MFC r281113:dchagin2015-04-121-2/+2
| | | | | | Fix wrong kassert msg in uma. PR: 199172
* MFC r280702: Make swapper release orphaned (lost) GEOM provider.mav2015-04-091-14/+50
| | | | | | 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.
* MFC r279720alc2015-04-031-1/+1
| | | | | Correct a typo in vm_object_backing_scan() that originated in r254141. Specifically, change a lock acquire into a lock release.
* MFC r280238alc2015-04-021-0/+9
| | | | | | | Fix the root cause of the "vm_reserv_populate: reserv <address> is already promoted" panics. PR: 198163
* MFC r278888:ngie2015-03-221-4/+2
| | | | Some minor style(9) fixes (whitespace + comment)
* Merge r263233 from HEAD to stable/10:rwatson2015-03-191-1/+1
| | | | | | | | | 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.
* MFC r279764:kib2015-03-151-1/+1
| | | | Fix function name in the panic message.
* MFC r277649:rstone2015-03-011-0/+3
| | | | | | | | | 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.
* MFC r277828:kib2015-02-113-3/+11
| | | | | | | | | | | | | 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.
* MFC r277646:kib2015-01-311-10/+16
| | | | Avoid calling vmspace_free() while owning the process lock.
* MFC r277055:kib2015-01-191-4/+0
| | | | Revert r263475: TDP_DEVMEMIO no longer needed.
* MFC r273701, r274556alc2015-01-023-49/+82
| | | | | | | | | | | 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.)
* MFC r275347:kib2014-12-141-2/+31
| | | | | Provide mutual exclusion between zone allocation/destruction and uma_reclaim().
* MFC r275513:kib2014-12-121-1/+6
| | | | | When the last reference on the vnode' vm object is dropped, read the vp->v_vflag without taking vnode lock and without bypass.
* MFC r274100:kib2014-11-112-10/+10
| | | | | Fix mis-spelling of bits and types names in the default_pager_putpages() and swap_pager_putpages().
* MFC r263710, r273377, r273378, r273423 and r273455:hselasky2014-10-272-4/+4
| | | | | | | - De-vnet hash sizes and hash masks. - Fix multiple issues related to arguments passed to SYSCTL macros. Sponsored by: Mellanox Technologies
* MFC r272573:bryanv2014-10-221-20/+20
| | | | | | | | | | 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.
* MFC r272907:kib2014-10-131-41/+67
| | | | | Make MAP_NOSYNC handling in the vm_fault() read-locked object path compatible with write-locked path.
* MFC r272536:kib2014-10-111-0/+49
| | | | Add kernel option KSTACK_USAGE_PROF.
* MFC r270759:smh2014-10-101-7/+26
| | | | | | | | | | | | 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
* MFC 272550:bryanv2014-10-081-2/+0
| | | | | | | | | 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.
* MFC r271351alc2014-10-041-9/+23
| | | | Fix a boundary case error in vm_reserv_alloc_contig().
* MFC r272071:smh2014-09-271-1/+1
| | | | | | | Fix ticks wrap issue of lowmem test in vm_pageout_scan Approved by: re (kib) Sponsored by: Multiplay
* MFC r272036:kib2014-09-271-1/+8
| | | | | | | Avoid calling vm_map_pmap_enter() for the MADV_WILLNEED on the wired entry, the pages must be already mapped. Approved by: re (gjb)
* MFC r271586:kib2014-09-211-10/+6
| | | | | | Fix mis-spelling of bits and types names in the vnode_pager_putpages(). Approved by: re (delphij)
* This is a direct commit to account for the renaming of 'cnt' to 'vm_cnt'alc2014-09-031-2/+2
| | | | in HEAD but not stable/10.
* MFC r270666alc2014-09-031-14/+17
| | | | | | | | | | | | | | | | | Back in the days when the kernel was single threaded, testing "vm_paging_target() > 0" was a reasonable way of determining if the inactive queue scan met its target. However, now that other threads can be allocating pages while the inactive queue scan is running, it's an unreliable method. The effect of it being unreliable is that we can start swapping out processes when we didn't intend to. This issue has existed since the kernel was multithreaded, but the changes to the inactive queue target in 10.0-RELEASE have made its effects visible. This change introduces a more direct method for determining if the inactive queue scan met its target that is not affected by the actions of other threads.
* Fix a leak of the wired pages when unwiring of the PROT_NONE-mappedkib2014-09-016-109/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wired region. Rework the handling of unwire to do the it in batch, both at pmap and object level. All commits below are by alc. MFC r268327: Introduce pmap_unwire(). MFC r268591: Implement pmap_unwire() for powerpc. MFC r268776: Implement pmap_unwire() for arm. MFC r268806: pmap_unwire(9) man page. MFC r269134: When unwiring a region of an address space, do not assume that the underlying physical pages are mapped by the pmap. This fixes a leak of the wired pages on the unwiring of the region mapped with no access allowed. MFC r269339: In the implementation of the new function pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before any changes are made to the PVO. Otherwise, MOEA64_PVO_TO_PTE() will panic. MFC r269365: Correct a long-standing problem in moea{,64}_pvo_enter() that was revealed by the combination of r268591 and r269134: When we attempt to add the wired attribute to an existing mapping, moea{,64}_pvo_enter() do nothing. (They only set the wired attribute on newly created mappings.) MFC r269433: Handle wiring failures in vm_map_wire() with the new functions pmap_unwire() and vm_object_unwire(). Retire vm_fault_{un,}wire(), since they are no longer used. MFC r269438: Rewrite a loop in vm_map_wire() so that gcc doesn't think that the variable "rv" is uninitialized. MFC r269485: Retire pmap_change_wiring(). Reviewed by: alc
* MFC r270011:kib2014-08-251-4/+51
| | | | | | | | | Implement 'fast path' for the vm page fault handler. MFC r270387 (by alc): Relax one of the conditions for mapping a page on the fast path. Approved by: re (gjb)
* MFC r261647 (by alc):kib2014-08-251-1/+4
| | | | Don't call vm_fault_prefault() on zero-fill faults.
* MFC r261412 (by alc):kib2014-08-251-24/+32
| | | | Make prefaulting more aggressive on hard faults.
* MFC r269978 (by alc):kib2014-08-251-2/+3
| | | | Avoid pointless (but harmless) actions on unmanaged pages.
* MFC r269746:kib2014-08-242-11/+27
| | | | | Adapt vm_page_aflag_set(PGA_WRITEABLE) to the locking of pmap_enter(PMAP_ENTER_NOSLEEP).
* Merge the changes to pmap_enter(9) for sleep-less operation (requestedkib2014-08-243-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | by flag). The ia64 pmap.c changes are direct commit, since ia64 is removed on head. MFC r269368 (by alc): Retire PVO_EXECUTABLE. MFC r269728: Change pmap_enter(9) interface to take flags parameter and superpage mapping size (currently unused). MFC r269759 (by alc): Update the text of a KASSERT() to reflect the changes in r269728. MFC r269822 (by alc): Change {_,}pmap_allocpte() so that they look for the flag PMAP_ENTER_NOSLEEP instead of M_NOWAIT/M_WAITOK when deciding whether to sleep on page table page allocation. MFC r270151 (by alc): Replace KASSERT that no PV list locks are held with a conditional unlock. Reviewed by: alc Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* MFC r269907:kib2014-08-201-0/+1
| | | | Fix leaks of unqueued unwired pages.
* MFC r269643:kib2014-08-131-1/+1
| | | | | Weaken the requirement for the vm object lock by only asserting locked object in vm_pager_page_unswapped(), instead of locked exclusively.
* MFC r269642:kib2014-08-131-0/+4
| | | | Add wrappers to assert that vm object is unlocked and for try upgrade.
* MFC r268615:kib2014-07-282-5/+8
| | | | | | | | | | | Add OBJ_TMPFS_NODE flag. MFC r268616: Set the OBJ_TMPFS_NODE flag for vm_object of VREG tmpfs node. MFC r269053: Correct assertion. tmpfs vm object is always at the bottom of the shadow chain.
* MFC r267213 (by alc):kib2014-07-244-14/+62
| | | | | | Add a page size field to struct vm_page. Approved by: alc
* MFC r267664:kib2014-06-271-0/+9
| | | | | | Assert that the new entry is inserted into the right location in the map entries list, and that it does not overlap with the previous and next entries.
* MFC r267630:kib2014-06-263-1/+7
| | | | Add MAP_EXCL flag for mmap(2).
* MFC r267766:kib2014-06-261-1/+1
| | | | Use correct names for the flags.
* MFC r267254:kib2014-06-232-40/+68
| | | | | | | Make mmap(MAP_STACK) search for the available address space. MFC r267497 (by alc): Use local variable instead of sgrowsiz.
* MFC r267391:mav2014-06-221-1/+2
| | | | | Introduce new "256 Bucket" zone to split requests and reduce congestion on "128 Bucket" zone lock.
* MFC r267387:mav2014-06-221-0/+2
| | | | | | | | | Allocating new bucket for bucket zone, never take it from the zone itself, since it will almost certanly fail. Take next bigger zone instead. This situation should not happen with original bucket zones configuration: "32 Bucket" zone uses "64 Bucket" and vice versa. But if "64 Bucket" zone lock is congested, zone may grow its bucket size and start biting itself.
* MFC r266780:kib2014-06-041-4/+1
| | | | Remove the assert which can be triggered by the userspace.
OpenPOWER on IntegriCloud