3450 Commits

Author SHA1 Message Date
jhb
017f11d1f3 MFC 281887:
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.
2015-06-02 19:20:39 +00:00
kib
3162ff437e MFC r283162:
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.
2015-05-27 08:30:16 +00:00
kib
09f1502b69 MFC r282690:
Call uma_reclaim() from the additional pagedaemon thread to reclaim kmem
arena address space.
2015-05-23 09:14:29 +00:00
kib
ae13a0da65 MFC r282128:
Do not sleep waiting for the MAP_ENTRY_IN_TRANSITION state ending with
the vnode locked.
2015-05-05 08:12:24 +00:00
scottl
8518c5cf96 Revert r281543. It causes a panic/hang early in boot for a number of
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.
2015-04-24 17:05:18 +00:00
alc
248744ce23 MFC r279400
Eliminate a variable that became unused when VFS_LOCK_GIANT() was
  eliminated.
2015-04-20 17:36:43 +00:00
dchagin
adf6ad45fa MFC r281162, r281451:
Use flexible array for per cpu uma_cache to avoid allocating
an extra struct uma_cache.

PR:		199169
2015-04-15 05:13:41 +00:00
dchagin
75ef967474 MFC r281113:
Fix wrong kassert msg in uma.

PR:           199172
2015-04-12 07:24:10 +00:00
mav
cffb1bfcba MFC r280702: Make swapper release orphaned (lost) GEOM provider.
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.
2015-04-09 10:11:47 +00:00
alc
bc3dc06c14 MFC r279720
Correct a typo in vm_object_backing_scan() that originated in r254141.
  Specifically, change a lock acquire into a lock release.
2015-04-03 16:40:39 +00:00
alc
a75a91e660 MFC r280238
Fix the root cause of the "vm_reserv_populate: reserv <address> is already
  promoted" panics.

PR:		198163
2015-04-02 19:10:33 +00:00
ngie
987a0e7bf1 MFC r278888:
Some minor style(9) fixes (whitespace + comment)
2015-03-22 05:54:48 +00:00
rwatson
6102a34d38 Merge r263233 from HEAD to stable/10:
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.
2015-03-19 13:37:36 +00:00
kib
98c5385f47 MFC r279764:
Fix function name in the panic message.
2015-03-15 18:40:06 +00:00
rstone
a206bae4b5 MFC r277649:
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.
2015-03-01 04:39:07 +00:00
kib
7ca5c317ae MFC r277828:
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.
2015-02-11 09:02:21 +00:00
kib
8cc5d657dc MFC r277646:
Avoid calling vmspace_free() while owning the process lock.
2015-01-31 11:02:20 +00:00
kib
44ff2e7b62 MFC r277055:
Revert r263475: TDP_DEVMEMIO no longer needed.
2015-01-19 11:07:29 +00:00
alc
d5a13901bf MFC r273701, r274556
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.)
2015-01-02 17:45:52 +00:00
kib
88eaa27723 MFC r275347:
Provide mutual exclusion between zone allocation/destruction and
uma_reclaim().
2014-12-14 09:34:55 +00:00
kib
8b3b3c8447 MFC r275513:
When the last reference on the vnode' vm object is dropped, read the
vp->v_vflag without taking vnode lock and without bypass.
2014-12-12 09:22:52 +00:00
kib
c7b266cfad MFC r274100:
Fix mis-spelling of bits and types names in the
default_pager_putpages() and swap_pager_putpages().
2014-11-11 11:06:10 +00:00
hselasky
1f41d295fb MFC r263710, r273377, r273378, r273423 and r273455:
- De-vnet hash sizes and hash masks.
- Fix multiple issues related to arguments passed to SYSCTL macros.

Sponsored by:	Mellanox Technologies
2014-10-27 14:38:00 +00:00
bryanv
0895e1be7f MFC r272573:
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.
2014-10-22 04:09:47 +00:00
kib
9a0f569181 MFC r272907:
Make MAP_NOSYNC handling in the vm_fault() read-locked object path
compatible with write-locked path.
2014-10-13 15:58:03 +00:00
kib
149982a012 MFC r272536:
Add kernel option KSTACK_USAGE_PROF.
2014-10-11 17:49:51 +00:00
smh
227e064147 MFC r270759:
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
2014-10-10 00:12:16 +00:00
bryanv
69c5e8194e MFC 272550:
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.
2014-10-08 04:07:07 +00:00
alc
2d2ce84b0c MFC r271351
Fix a boundary case error in vm_reserv_alloc_contig().
2014-10-04 22:52:21 +00:00
smh
881bf9eca2 MFC r272071:
Fix ticks wrap issue of lowmem test in vm_pageout_scan

Approved by:	re (kib)
Sponsored by:	Multiplay
2014-09-27 18:20:45 +00:00
kib
6a9b8ab035 MFC r272036:
Avoid calling vm_map_pmap_enter() for the MADV_WILLNEED on the wired
entry, the pages must be already mapped.

Approved by:	re (gjb)
2014-09-27 07:54:27 +00:00
kib
0d20ed9aa7 MFC r271586:
Fix mis-spelling of bits and types names in the vnode_pager_putpages().

Approved by:	re (delphij)
2014-09-21 09:09:37 +00:00
alc
f97e8c2642 This is a direct commit to account for the renaming of 'cnt' to 'vm_cnt'
in HEAD but not stable/10.
2014-09-03 07:20:09 +00:00
alc
3295e3612e MFC r270666
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.
2014-09-03 06:47:05 +00:00
kib
798eea1614 Fix a leak of the wired pages when unwiring of the PROT_NONE-mapped
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
2014-09-01 07:58:15 +00:00
kib
4e198665c5 MFC r270011:
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)
2014-08-25 21:21:29 +00:00
kib
35c4352f4c MFC r261647 (by alc):
Don't call vm_fault_prefault() on zero-fill faults.
2014-08-25 21:19:08 +00:00
kib
9824920980 MFC r261412 (by alc):
Make prefaulting more aggressive on hard faults.
2014-08-25 21:16:57 +00:00
kib
511f9b7525 MFC r269978 (by alc):
Avoid pointless (but harmless) actions on unmanaged pages.
2014-08-25 20:49:25 +00:00
kib
4fe668ee1a MFC r269746:
Adapt vm_page_aflag_set(PGA_WRITEABLE) to the locking of
pmap_enter(PMAP_ENTER_NOSLEEP).
2014-08-24 07:57:50 +00:00
kib
25782a7fab Merge the changes to pmap_enter(9) for sleep-less operation (requested
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
2014-08-24 07:53:15 +00:00
kib
68885db3a4 MFC r269907:
Fix leaks of unqueued unwired pages.
2014-08-20 08:24:37 +00:00
kib
c23d839444 MFC r269643:
Weaken the requirement for the vm object lock by only asserting locked
object in vm_pager_page_unswapped(), instead of locked exclusively.
2014-08-13 06:58:42 +00:00
kib
82ab11ec35 MFC r269642:
Add wrappers to assert that vm object is unlocked and for try upgrade.
2014-08-13 06:55:30 +00:00
kib
20a6651181 MFC r268615:
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.
2014-07-28 01:21:02 +00:00
kib
d7d6313cf4 MFC r267213 (by alc):
Add a page size field to struct vm_page.

Approved by:	alc
2014-07-24 16:29:44 +00:00
kib
4dd240dde0 MFC r267664:
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.
2014-06-27 11:42:51 +00:00
kib
15d33955d2 MFC r267630:
Add MAP_EXCL flag for mmap(2).
2014-06-26 08:30:08 +00:00
kib
5d64734c2e MFC r267766:
Use correct names for the flags.
2014-06-26 08:24:18 +00:00
kib
bab6ec9043 MFC r267254:
Make mmap(MAP_STACK) search for the available address space.

MFC r267497 (by alc):
Use local variable instead of sgrowsiz.
2014-06-23 08:08:22 +00:00