#
d48524e2 |
| 21-Aug-2024 |
Doug Moore <dougm@FreeBSD.org> |
dev_pager: define free_page for mgt devices
Callers of cdev_pager_free_page in the kernel always have object->type == OBJT_MGTDEVICE. Define a function for them to call that skips the runtime type c
dev_pager: define free_page for mgt devices
Callers of cdev_pager_free_page in the kernel always have object->type == OBJT_MGTDEVICE. Define a function for them to call that skips the runtime type check in cdev_pager_free.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46389
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
29363fb4 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
2ff63af9 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
ec201ddd |
| 20-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_pager: add method to veto page allocation
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37097
|
#
d537d1f1 |
| 20-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_pager: add methods for page insertion and removal notifications
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.fre
vm_pager: add methods for page insertion and removal notifications
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37097
show more ...
|
Revision tags: release/13.1.0 |
|
#
f4cdb9d7 |
| 01-Feb-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
vm/vm_pager.h: use sys/systm.h header
it is needed for __read_mostly attribute definition, which right now comes from vm/vm_page.h including sys/systm.h
Sponsored by: The FreeBSD Foundation MFC aft
vm/vm_pager.h: use sys/systm.h header
it is needed for __read_mostly attribute definition, which right now comes from vm/vm_page.h including sys/systm.h
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34089
show more ...
|
Revision tags: release/12.3.0 |
|
#
b730fd30 |
| 07-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm: Add KPI to dynamically register pagers
Pager is allowed to inherit part of its implementation from the existing pager, which is done by copying non-NULL virtual method slots.
Reviewed by: markj
vm: Add KPI to dynamically register pagers
Pager is allowed to inherit part of its implementation from the existing pager, which is done by copying non-NULL virtual method slots.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30168
show more ...
|
#
00a3fe96 |
| 07-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_object_kvme_type(): reimplement by embedding kvme_type into pagerops
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://review
vm_object_kvme_type(): reimplement by embedding kvme_type into pagerops
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30168
show more ...
|
#
d474440a |
| 03-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Constify vm_pager-related virtual tables.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
|
#
4b8365d7 |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add OBJT_SWAP_TMPFS pager
This is OBJT_SWAP pager, specialized for tmpfs. Right now, both swap pager and generic vm code have to explicitly handle swap objects which are tmpfs vnode v_object, in th
Add OBJT_SWAP_TMPFS pager
This is OBJT_SWAP pager, specialized for tmpfs. Right now, both swap pager and generic vm code have to explicitly handle swap objects which are tmpfs vnode v_object, in the special ways. Replace (almost) all such places with proper methods.
Since VM still needs a notion of the 'swap object', regardless of its use, add yet another type-classification flag OBJ_SWAP. Set it in vm_object_allocate() where other type-class flags are set.
This change almost completely eliminates the knowledge of tmpfs from VM, and opens a way to make OBJT_SWAP_TMPFS loadable from tmpfs.ko.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
#
a7c198a2 |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Implement vm_object_vnode() using vm_pager_getvp()
Allow vp_heldp argument to be NULL, in which case the returned vnode is not held for tmpfs swap objects.
Reviewed by: markj Tested by: pho Sponsor
Implement vm_object_vnode() using vm_pager_getvp()
Allow vp_heldp argument to be NULL, in which case the returned vnode is not held for tmpfs swap objects.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
#
1390a5cb |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add pgo_freespace method
Makes the code in vm_object collapse/page_remove cleaner
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: htt
Add pgo_freespace method
Makes the code in vm_object collapse/page_remove cleaner
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
#
192112b7 |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add pgo_getvp method
This eliminates the staircase of conditions in vm_map_entry_set_vnode_text().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Different
Add pgo_getvp method
This eliminates the staircase of conditions in vm_map_entry_set_vnode_text().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
#
c23c555b |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add pgo_mightbedirty method
Used to implement vm_object_mightbedirty()
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://review
Add pgo_mightbedirty method
Used to implement vm_object_mightbedirty()
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
#
180bcaa4 |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_pager: add pgo_set_writeable_dirty method
specialized for swap and vnode pagers, and used to implement vm_object_set_writeable_dirty().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBS
vm_pager: add pgo_set_writeable_dirty method
specialized for swap and vnode pagers, and used to implement vm_object_set_writeable_dirty().
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
#
ee4211bc |
| 01-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_pager: style some wrappers
Fill lines with the function definitions. Use local var to shorten repeated extra-long expressions.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundat
vm_pager: style some wrappers
Fill lines with the function definitions. Use local var to shorten repeated extra-long expressions.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30070
show more ...
|
Revision tags: release/13.0.0 |
|
#
cd853791 |
| 28-Nov-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pag
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value.
Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work.
Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav.
Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225
show more ...
|
Revision tags: release/12.2.0 |
|
#
a720b31c |
| 09-Sep-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Allow consumer to customize physical pager.
Add support for user-supplied callbacks into phys pager operations, providing custom getpages(), haspage(), and populate() methods implementations. Pager
Allow consumer to customize physical pager.
Add support for user-supplied callbacks into phys pager operations, providing custom getpages(), haspage(), and populate() methods implementations. Pager stores user data ptr/val in the object to provide context.
Add phys_pager_allocate() helper that takes user ops table as one of the arguments.
Current code for these methods is moved to the 'default' ops table, assigned automatically when vm_pager_alloc() is used.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652
show more ...
|
#
c3aa3bf9 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
vm: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
91019ea7 |
| 29-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358400 through r358465.
|
#
c99d0c58 |
| 28-Feb-2020 |
Mark Johnston <markj@FreeBSD.org> |
Add a blocking counter KPI.
refcount(9) was recently extended to support waiting on a refcount to drop to zero, as this was needed for a lockless VM object paging-in-progress counter. However, this
Add a blocking counter KPI.
refcount(9) was recently extended to support waiting on a refcount to drop to zero, as this was needed for a lockless VM object paging-in-progress counter. However, this adds overhead to all uses of refcount(9) and doesn't really match traditional refcounting semantics: once a counter has dropped to zero, the protected object may be freed at any point and it is not safe to dereference the counter.
This change removes that extension and instead adds a new set of KPIs, blockcount_*, for use by VM object PIP and busy.
Reviewed by: jeff, kib, mjg Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23723
show more ...
|
#
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 ...
|
Revision tags: release/12.1.0 |
|
#
f993ed2f |
| 09-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351732 through r352104.
|
#
fe7bcbaf |
| 03-Sep-2019 |
Kyle Evans <kevans@FreeBSD.org> |
vm pager: writemapping accounting for OBJT_SWAP
Currently writemapping accounting is only done for vnode_pager which does some accounting on the underlying vnode.
Extend this to allow accounting to
vm pager: writemapping accounting for OBJT_SWAP
Currently writemapping accounting is only done for vnode_pager which does some accounting on the underlying vnode.
Extend this to allow accounting to be possible for any of the pager types. New pageops are added to update/release writecount that need to be implemented for any pager wishing to do said accounting, and we implement these methods now for both vnode_pager (unchanged) and swap_pager.
The primary motivation for this is to allow other systems with OBJT_SWAP objects to check if their objects have any write mappings and reject operations with EBUSY if so. posixshm will be the first to do so in order to reject adding write seals to the shmfd if any writable mappings exist.
Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D21456
show more ...
|
#
4153054a |
| 20-Aug-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Permit vm_pager_has_page() to run with a shared lock. Introduce VM_OBJECT_DROP/VM_OBJECT_PICKUP to handle functions that are called with uncertain lock state.
Reviewed by: kib, markj Tested by: pho
Permit vm_pager_has_page() to run with a shared lock. Introduce VM_OBJECT_DROP/VM_OBJECT_PICKUP to handle functions that are called with uncertain lock state.
Reviewed by: kib, markj Tested by: pho Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21310
show more ...
|