#
4dfa06e1 |
| 18-Jul-2020 |
Chuck Silvers <chs@FreeBSD.org> |
Add a new function vm_page_free_invalid() for freeing invalid pages that might be wired. If the page is wired then it cannot be freed now, but the thread that eventually unwires it will free it at t
Add a new function vm_page_free_invalid() for freeing invalid pages that might be wired. If the page is wired then it cannot be freed now, but the thread that eventually unwires it will free it at that point.
Reviewed by: markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25430
show more ...
|
#
ffc568ba |
| 10-Jul-2020 |
Scott Long <scottl@FreeBSD.org> |
Revert r362998, r326999 while a better compatibility strategy is devised.
|
#
b302c2e5 |
| 07-Jul-2020 |
Scott Long <scottl@FreeBSD.org> |
Migrate the feature of excluding RAM pages to use "excludelist" as its nomenclature.
MFC after: 1 week
|
Revision tags: release/11.4.0 |
|
#
a9ea09e5 |
| 28-Apr-2020 |
Mark Johnston <markj@FreeBSD.org> |
Re-check for wirings after busying the page in vm_page_release_locked().
A concurrent unlocked lookup can wire the page after vm_page_release_locked() releases the last wiring, in which case vm_page
Re-check for wirings after busying the page in vm_page_release_locked().
A concurrent unlocked lookup can wire the page after vm_page_release_locked() releases the last wiring, in which case vm_page_release_locked() must not free the page. Once the xbusy lock is acquired, that, the object lock and the fact that the page is unmapped ensure that the wire count cannot increase, so re-check for new wirings after the page is xbusied.
Update the comment above vm_page_wired() to reflect the new synchronization rules.
Reported by: glebius Reviewed by: alc, jeff, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24592
show more ...
|
#
91019ea7 |
| 29-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358400 through r358465.
|
#
6be21eb7 |
| 28-Feb-2020 |
Jeff Roberson <jeff@FreeBSD.org> |
Provide a lock free alternative to resolve bogus pages. This is not likely to be much of a perf win, just a nice code simplification.
Reviewed by: markj, kib Differential Revision: https://reviews.
Provide a lock free alternative to resolve bogus pages. This is not likely to be much of a perf win, just a nice code simplification.
Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D23866
show more ...
|
#
75dfc66c |
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
#
c49be4f1 |
| 27-Feb-2020 |
Jeff Roberson <jeff@FreeBSD.org> |
Add unlocked grab* function variants that use lockless radix code to lookup pages. These variants will fall back to their locked counterparts if the page is not present.
Discussed with: kib, markj
Add unlocked grab* function variants that use lockless radix code to lookup pages. These variants will fall back to their locked counterparts if the page is not present.
Discussed with: kib, markj Differential Revision: https://reviews.freebsd.org/D23449
show more ...
|
#
43c7dd6b |
| 19-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358075 through r358130.
|
#
e9ceb9dd |
| 19-Feb-2020 |
Jeff Roberson <jeff@FreeBSD.org> |
Don't release xbusy on kmem pages. After lockless page lookup we will not be able to guarantee that they can be racquired without blocking.
Reviewed by: kib Discussed with: markj Differential Revis
Don't release xbusy on kmem pages. After lockless page lookup we will not be able to guarantee that they can be racquired without blocking.
Reviewed by: kib Discussed with: markj Differential Revision: https://reviews.freebsd.org/D23506
show more ...
|
#
3c4ad300 |
| 17-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358000 through r358048.
|
#
f212367b |
| 17-Feb-2020 |
Jeff Roberson <jeff@FreeBSD.org> |
Refactor _vm_page_busy_sleep to reduce the delta between the various sleep routines and introduce a variant that supports lockless sleep.
Reviewed by: kib Differential Revision: https://reviews.free
Refactor _vm_page_busy_sleep to reduce the delta between the various sleep routines and introduce a variant that supports lockless sleep.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23612
show more ...
|
#
bc02c18c |
| 07-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357408 through r357661.
|
#
ee9e43f8 |
| 04-Feb-2020 |
Jeff Roberson <jeff@FreeBSD.org> |
Add an explicit busy state for free pages. This improves behavior with potential bugs that access freed pages as well as providing a path towards lockless page lookup.
Reviewed by: kib Differential
Add an explicit busy state for free pages. This improves behavior with potential bugs that access freed pages as well as providing a path towards lockless page lookup.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23444
show more ...
|
#
8be7eb94 |
| 01-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357368 through r357388.
|
#
f0a273c0 |
| 01-Feb-2020 |
Mark Johnston <markj@FreeBSD.org> |
Remove a couple of lingering usages of the page lock.
Update vm_page_scan_contig() and vm_page_reclaim_run() to stop using vm_page_change_lock(). It has no use after r356157. Remove vm_page_change
Remove a couple of lingering usages of the page lock.
Update vm_page_scan_contig() and vm_page_reclaim_run() to stop using vm_page_change_lock(). It has no use after r356157. Remove vm_page_change_lock() now that it has no users.
Remove an unncessary check for wirings in vm_page_scan_contig(), which was previously checking twice. The check is racy until vm_page_reclaim_run() ensures that the page is unmapped, so one check is sufficient.
Reviewed by: jeff, kib (previous versions) Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D23279
show more ...
|
#
727150ff |
| 28-Dec-2019 |
Mark Johnston <markj@FreeBSD.org> |
Remove some unused functions.
The previous series of patches orphaned some vm_page functions, so remove them.
Reviewed by: dougm, kib Sponsored by: Netflix, Intel Differential Revision: https://rev
Remove some unused functions.
The previous series of patches orphaned some vm_page functions, so remove them.
Reviewed by: dougm, kib Sponsored by: Netflix, Intel Differential Revision: https://reviews.freebsd.org/D22886
show more ...
|
#
dc71caa0 |
| 28-Dec-2019 |
Mark Johnston <markj@FreeBSD.org> |
Update the vm_page.h block comment to reflect recent changes.
Explain the new locking rules for per-page queue state updates.
Reviewed by: jeff, kib Sponsored by: Netflix, Intel Differential Revisi
Update the vm_page.h block comment to reflect recent changes.
Explain the new locking rules for per-page queue state updates.
Reviewed by: jeff, kib Sponsored by: Netflix, Intel Differential Revision: https://reviews.freebsd.org/D22884
show more ...
|
#
9f5632e6 |
| 28-Dec-2019 |
Mark Johnston <markj@FreeBSD.org> |
Remove page locking for queue operations.
With the previous reviews, the page lock is no longer required in order to perform queue operations on a page. It is also no longer needed in the page queu
Remove page locking for queue operations.
With the previous reviews, the page lock is no longer required in order to perform queue operations on a page. It is also no longer needed in the page queue scans. This change effectively eliminates remaining uses of the page lock and also the false sharing caused by multiple pages sharing a page lock.
Reviewed by: jeff Tested by: pho Sponsored by: Netflix, Intel Differential Revision: https://reviews.freebsd.org/D22885
show more ...
|
#
f3f38e25 |
| 28-Dec-2019 |
Mark Johnston <markj@FreeBSD.org> |
Start implementing queue state updates using fcmpset loops.
This is in preparation for eliminating the use of the vm_page lock for protecting queue state operations.
Introduce the vm_page_pqstate_c
Start implementing queue state updates using fcmpset loops.
This is in preparation for eliminating the use of the vm_page lock for protecting queue state operations.
Introduce the vm_page_pqstate_commit_*() functions. These functions act as helpers around vm_page_astate_fcmpset() and are specialized for specific types of operations. vm_page_pqstate_commit() wraps these functions.
Convert a number of routines to use these new helpers. Use vm_page_release_toq() in vm_page_unwire() and vm_page_release() to atomically release a wiring reference and release the page into a queue. This has the side effect that vm_page_unwire() will leave the page in the active queue if it is already present there.
Convert the page queue scans to use the new helpers. Simplify vm_pageout_reinsert_inactive(), which requeues pages that were found to be busy during an inactive queue scan, to avoid duplicating the work of vm_pqbatch_process_page(). In particular, if PGA_REQUEUE or PGA_REQUEUE_HEAD is set, let that be handled during batch processing.
Reviewed by: jeff Tested by: pho Sponsored by: Netflix, Intel Differential Revision: https://reviews.freebsd.org/D22770 Differential Revision: https://reviews.freebsd.org/D22771 Differential Revision: https://reviews.freebsd.org/D22772 Differential Revision: https://reviews.freebsd.org/D22773 Differential Revision: https://reviews.freebsd.org/D22776
show more ...
|
#
3cf3b4e6 |
| 22-Dec-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Make page busy state deterministic on free. Pages must be xbusy when removed from objects including calls to free. Pages must not be xbusy when freed and not on an object. Strengthen assertions to
Make page busy state deterministic on free. Pages must be xbusy when removed from objects including calls to free. Pages must not be xbusy when freed and not on an object. Strengthen assertions to match these expectations. In practice very little code had to change busy handling to meet these rules but we can now make stronger guarantees to busy holders and avoid conditionally dropping busy in free.
Refine vm_page_remove() and vm_page_replace() semantics now that we have stronger guarantees about busy state. This removes redundant and potentially problematic code that has proliferated.
Discussed with: markj Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D22822
show more ...
|
#
c2f22e97 |
| 18-Dec-2019 |
Mark Johnston <markj@FreeBSD.org> |
Fix the aflag shift on big-endian platforms after r355672.
The structure offset is zero regardless of endianness.
Reported by: brooks Pointy hat: markj
|
#
a8081778 |
| 15-Dec-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Add a deferred free mechanism for freeing swap space that does not require an exclusive object lock.
Previously swap space was freed on a best effort basis when a page that had valid swap was dirtie
Add a deferred free mechanism for freeing swap space that does not require an exclusive object lock.
Previously swap space was freed on a best effort basis when a page that had valid swap was dirtied, thus invalidating the swap copy. This may be done inconsistently and requires the object lock which is not always convenient.
Instead, track when swap space is present. The first dirty is responsible for deleting space or setting PGA_SWAP_FREE which will trigger background scans to free the swap space.
Simplify the locking in vm_fault_dirty() now that we can reliably identify the first dirty.
Discussed with: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D22654
show more ...
|
#
cbc080b4 |
| 13-Dec-2019 |
Mark Johnston <markj@FreeBSD.org> |
Avoid relying on silent type casting in the native atomic_load_32.
Reported by: np
|
#
6fbaf685 |
| 12-Dec-2019 |
Mark Johnston <markj@FreeBSD.org> |
Implement atomic state updates using the new vm_page_astate_t structure.
Introduce primitives vm_page_astate_load() and vm_page_astate_fcmpset() to operate on the 32-bit per-page atomic state. Modi
Implement atomic state updates using the new vm_page_astate_t structure.
Introduce primitives vm_page_astate_load() and vm_page_astate_fcmpset() to operate on the 32-bit per-page atomic state. Modify vm_page_pqstate_fcmpset() to use them. No functional change intended.
Introduce PGA_QUEUE_OP_MASK, a subset of PGA_QUEUE_STATE_MASK that only includes queue operation flags. This will be used in subsequent patches.
Reviewed by: alc, jeff, kib Sponsored by: Netflix, Intel Differential Revision: https://reviews.freebsd.org/D22753
show more ...
|