#
98150664 |
| 31-Aug-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Make swapoff reliable.
The swap_pager_swapoff() function uses trylock for the object lock before pagein, which means that either i/o to md(4) over swap, or intensive page faults over swap pager obje
Make swapoff reliable.
The swap_pager_swapoff() function uses trylock for the object lock before pagein, which means that either i/o to md(4) over swap, or intensive page faults over swap pager objects might prevent swapoff() from making any progress. Then the retry < 100 check fails and machine panics.
If trylock fails, acquire the object lock in the blockable way and restart the hash bucket walk. Keep retries logic for now.
Reported and tested by: pho Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D7688
show more ...
|
#
aa0c5579 |
| 30-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r305029 through r305080.
|
#
915d1b71 |
| 30-Aug-2016 |
Mark Johnston <markj@FreeBSD.org> |
Restore swap pager readahead after r292373.
The removal of vm_fault_additional_pages() meant that a hard fault on a swap-backed page would result in only that page being read in. This change impleme
Restore swap pager readahead after r292373.
The removal of vm_fault_additional_pages() meant that a hard fault on a swap-backed page would result in only that page being read in. This change implements readahead and readbehind for the swap pager in swap_pager_getpages(). swap_pager_haspage() is modified to return the largest contiguous non-resident range of pages containing the requested range.
Reviewed by: alc, kib Tested by: pho MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D7677
show more ...
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|
#
0c657d22 |
| 03-Aug-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Explain why swapgeom_close_ev() is delegated.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
88ad2d7b |
| 28-Jul-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Do not delegate a work to geom event thread which can be done inline.
In particular, swapongeom_ev() needed event thread context when swap pager configuration was performed under Giant and geom asse
Do not delegate a work to geom event thread which can be done inline.
In particular, swapongeom_ev() needed event thread context when swap pager configuration was performed under Giant and geom asserted that Giant is not owned. Now both of the reason went away.
On the other hand, note that swpageom_release() is called from the bio_done context, and possible close cannot be performed inline.
Also fix some minor issues. The swapgeom() function does not use the td argument, remove it. Recheck that the vnode passed is still VCHR and not reclaimed after the lock.
Reviewed by: mav Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
show more ...
|
#
2174a0c6 |
| 28-Jul-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Fix style and typo.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
eb4d6a1b |
| 13-Jun-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Fix inconsistent locking of the swap pager named objects list.
Right now, all modifications of the list are locked by sw_alloc_mtx. But initial lookup of the object by the handle in swap_pager_alloc
Fix inconsistent locking of the swap pager named objects list.
Right now, all modifications of the list are locked by sw_alloc_mtx. But initial lookup of the object by the handle in swap_pager_alloc() is not protected by sw_alloc_mtx, which means that vm_pager_object_lookup() could follow freed pointer.
Create a new named swap object with the OBJT_SWAP type, instead of OBJT_DEFAULT. With this change, swp_pager_meta_build() never need to upgrade named OBJT_DEFAULT to OBJT_SWAP (in the other place, we do not forbid for client code to create named OBJT_DEFAULT objects at all).
That change allows to remove sw_alloc_mtx and make the list locked by sw_alloc_sx lock. Update swap_pager_copy() to new locking mode.
Create helper swap_pager_alloc_init() to consolidate named and anonymous swap objects creation, while a caller ensures that the neccesary locks are held around the helper.
Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Approved by: re (hrs)
show more ...
|
#
15719273 |
| 13-Jun-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Explicitely initialize sw_alloc_sx. Currently it is not initialized but works due to zeroed out bss on startup.
Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by:
Explicitely initialize sw_alloc_sx. Currently it is not initialized but works due to zeroed out bss on startup.
Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (hrs)
show more ...
|
#
9a204708 |
| 24-May-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove Giant around allocation of the swap pager with non-NULL handle. Existing issue of not protecting pager_object_list iteration in vm_pager_object_lookup() by sw_alloc_mtx is not affected by Gian
Remove Giant around allocation of the swap pager with non-NULL handle. Existing issue of not protecting pager_object_list iteration in vm_pager_object_lookup() by sw_alloc_mtx is not affected by Giant removal.
Reviewed by: alc Sponsored by: The FreeBSD Foundation
show more ...
|
#
4c36e917 |
| 23-May-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Mark swap-related proc sysctls as not requiring Giant.
Reviewed by: alc (as part of larger patch) Sponsored by: The FreeBSD Foundation
|
#
04533e1e |
| 23-May-2016 |
Konstantin Belousov <kib@FreeBSD.org> |
Replace hand-made exclusive lock, protecting against parallel swapon/swapoff invocations, with sx.
Reviewed by: alc (as part of larger patch) Sponsored by: The FreeBSD Foundation
|
#
763df3ec |
| 02-May-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/vm: minor spelling fixes in comments.
No functional change.
|
Revision tags: release/10.3.0 |
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
9a7cd2e6 |
| 22-Dec-2015 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MFH @r292599
This includes the pluggable TCP framework and other chnages to the netstack to track for VNET stability.
Security: The FreeBSD Foundation
|
#
b0cd2017 |
| 16-Dec-2015 |
Gleb Smirnoff <glebius@FreeBSD.org> |
A change to KPI of vm_pager_get_pages() and underlying VOP_GETPAGES().
o With new KPI consumers can request contiguous ranges of pages, and unlike before, all pages will be kept busied on return,
A change to KPI of vm_pager_get_pages() and underlying VOP_GETPAGES().
o With new KPI consumers can request contiguous ranges of pages, and unlike before, all pages will be kept busied on return, like it was done before with the 'reqpage' only. Now the reqpage goes away. With new interface it is easier to implement code protected from race conditions.
Such arrayed requests for now should be preceeded by a call to vm_pager_haspage() to make sure that request is possible. This could be improved later, making vm_pager_haspage() obsolete.
Strenghtening the promises on the business of the array of pages allows us to remove such hacks as swp_pager_free_nrpage() and vm_pager_free_nonreq().
o New KPI accepts two integer pointers that may optionally point at values for read ahead and read behind, that a pager may do, if it can. These pages are completely owned by pager, and not controlled by the caller.
This shifts the UFS-specific readahead logic from vm_fault.c, which should be file system agnostic, into vnode_pager.c. It also removes one VOP_BMAP() request per hard fault.
Discussed with: kib, alc, jeff, scottl Sponsored by: Nginx, Inc. Sponsored by: Netflix
show more ...
|
#
11d38a57 |
| 28-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
Sponsored by: Gandi.net
|
#
becbad1f |
| 13-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
a997b777 |
| 13-Oct-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Sync up with head up to r289211.
|
#
9be27fdc |
| 10-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
88750be4 |
| 06-Oct-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r288836 through r288925.
|
#
d635a37f |
| 05-Oct-2015 |
Warner Losh <imp@FreeBSD.org> |
Mark swap_pager_putpages static at its definition. It was already static at its declaration. Remove needless swapdev_strategy forward declaration.
MFC After: 3 days
|
#
f94594b3 |
| 12-Sep-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Finish merging from head, messed up in previous attempt
|
#
b5ff185e |
| 12-Sep-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
0e1e5c22 |
| 11-Sep-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r287527 through r287679.
|