#
c1d12b92 |
| 08-Dec-2024 |
Doug Moore <dougm@FreeBSD.org> |
vm_page: pass page to iter_remove
Pass the to-be-freed page to vm_page_iter_remove as a parameter, rather than computing it from the iterator parameter, to improve performance.
Reviewed by: alc Dif
vm_page: pass page to iter_remove
Pass the to-be-freed page to vm_page_iter_remove as a parameter, rather than computing it from the iterator parameter, to improve performance.
Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D47730
show more ...
|
Revision tags: release/14.2.0 |
|
#
aabd759c |
| 26-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
drm2: Fix the build after commit 38e3125d6df9
Fixes: 38e3125d6df9 ("device_pager: user iterators to free device pages")
|
#
38e3125d |
| 21-Nov-2024 |
Doug Moore <dougm@FreeBSD.org> |
device_pager: user iterators to free device pages
Change cdev_mgtdev_page_free_page to take an iterator, rather than an object and page, so that removing the page from the object radix tree can take
device_pager: user iterators to free device pages
Change cdev_mgtdev_page_free_page to take an iterator, rather than an object and page, so that removing the page from the object radix tree can take advantage of locality with iterators. Define a general-purpose function to free all pages, which can be used in several places.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D47692
show more ...
|
Revision tags: release/13.4.0 |
|
#
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 ...
|
#
cd836f60 |
| 21-Jul-2024 |
Alan Cox <alc@FreeBSD.org> |
vm: Retire kmem_arena
It has simply been an alias for the kernel_arena for many years now. Enough time has passed to retire it. Any out-of-tree kernel modules that directly use kmem_arena should sw
vm: Retire kmem_arena
It has simply been an alias for the kernel_arena for many years now. Enough time has passed to retire it. Any out-of-tree kernel modules that directly use kmem_arena should switch to kernel_arena.
Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D46057
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
be82b3a0 |
| 26-Dec-2023 |
Emmanuel Vadot <manu@FreeBSD.org> |
clk: Move clock code in dev/clk
We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of
clk: Move clock code in dev/clk
We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name.
Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43191
show more ...
|
#
2619c5cc |
| 21-Nov-2023 |
Jason A. Harmening <jah@FreeBSD.org> |
Avoid waiting on physical allocations that can't possibly be satisfied
- Change vm_page_reclaim_contig[_domain] to return an errno instead of a boolean. 0 indicates a successful reclaim, ENOMEM i
Avoid waiting on physical allocations that can't possibly be satisfied
- Change vm_page_reclaim_contig[_domain] to return an errno instead of a boolean. 0 indicates a successful reclaim, ENOMEM indicates lack of available memory to reclaim, with any other error (currently only ERANGE) indicating that reclamation is impossible for the specified address range. Change all callers to only follow up with vm_page_wait* in the ENOMEM case.
- Introduce vm_domainset_iter_ignore(), which marks the specified domain as unavailable for further use by the iterator. Use this function to ignore domains that can't possibly satisfy a physical allocation request. Since WAITOK allocations run the iterators repeatedly, this avoids the possibility of infinitely spinning in domain iteration if no available domain can satisfy the allocation request.
PR: 274252 Reported by: kevans Tested by: kevans Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42706
show more ...
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0 |
|
#
e2493f49 |
| 25-Oct-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
arm: fix a typo in nvidia/drm2/tegra_bo.c
Unbreaks building TEGRA124
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
#
84c39222 |
| 20-Oct-2021 |
Mark Johnston <markj@FreeBSD.org> |
Convert consumers to vm_page_alloc_noobj_contig()
Remove now-unneeded page zeroing. No functional change intended.
Reviewed by: alc, hselasky, kib MFC after: 1 week Sponsored by: The FreeBSD Found
Convert consumers to vm_page_alloc_noobj_contig()
Remove now-unneeded page zeroing. No functional change intended.
Reviewed by: alc, hselasky, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32006
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
65454883 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
arm: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
0f9e06e1 |
| 02-Dec-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Fix a few places that free a page from an object without busy held. This is tightening constraints on busy as a precursor to lockless page lookup and should largely be a NOP for these cases.
Review
Fix a few places that free a page from an object without busy held. This is tightening constraints on busy as a precursor to lockless page lookup and should largely be a NOP for these cases.
Reviewed by: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D22611
show more ...
|
Revision tags: release/12.1.0 |
|
#
61c1328e |
| 13-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352105 through r352307.
|
#
fee2a2fa |
| 09-Sep-2019 |
Mark Johnston <markj@FreeBSD.org> |
Change synchonization rules for vm_page reference counting.
There are several mechanisms by which a vm_page reference is held, preventing the page from being freed back to the page allocator. In pa
Change synchonization rules for vm_page reference counting.
There are several mechanisms by which a vm_page reference is held, preventing the page from being freed back to the page allocator. In particular, holding the page's object lock is sufficient to prevent the page from being freed; holding the busy lock or a wiring is sufficent as well. These references are protected by the page lock, which must therefore be acquired for many per-page operations. This results in false sharing since the page locks are external to the vm_page structures themselves and each lock protects multiple structures.
Transition to using an atomically updated per-page reference counter. The object's reference is counted using a flag bit in the counter. A second flag bit is used to atomically block new references via pmap_extract_and_hold() while removing managed mappings of a page. Thus, the reference count of a page is guaranteed not to increase if the page is unbusied, unmapped, and the object's write lock is held. As a consequence of this, the page lock no longer protects a page's identity; operations which move pages between objects are now synchronized solely by the objects' locks.
The vm_page_wire() and vm_page_unwire() KPIs are changed. The former requires that either the object lock or the busy lock is held. The latter no longer has a return value and may free the page if it releases the last reference to that page. vm_page_unwire_noq() behaves the same as before; the caller is responsible for checking its return value and freeing or enqueuing the page as appropriate. vm_page_wire_mapped() is introduced for use in pmap_extract_and_hold(). It fails if the page is concurrently being unmapped, typically triggering a fallback to the fault handler. vm_page_wire() no longer requires the page lock and vm_page_unwire() now internally acquires the page lock when releasing the last wiring of a page (since the page lock still protects a page's queue state). In particular, synchronization details are no longer leaked into the caller.
The change excises the page lock from several frequently executed code paths. In particular, vm_object_terminate() no longer bounces between page locks as it releases an object's pages, and direct I/O and sendfile(SF_NOCACHE) completions no longer require the page lock. In these latter cases we now get linear scalability in the common scenario where different threads are operating on different files.
__FreeBSD_version is bumped. The DRM ports have been updated to accomodate the KPI changes.
Reviewed by: jeff (earlier version) Tested by: gallatin (earlier version), pho Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20486
show more ...
|
Revision tags: release/11.3.0 |
|
#
e532a999 |
| 20-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349234
Sponsored by: The FreeBSD Foundation
|
#
88ea538a |
| 07-Jun-2019 |
Mark Johnston <markj@FreeBSD.org> |
Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m).
These calls are not the same in general: the former will dequeue the page if it is enqueued, while the latter will just leave i
Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m).
These calls are not the same in general: the former will dequeue the page if it is enqueued, while the latter will just leave it alone. But, all existing uses of the former apply to unmanaged pages, which are never enqueued in the first place. No functional change intended.
Reviewed by: kib MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20470
show more ...
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
2c0f13aa |
| 20-Feb-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_wait() rework.
Make vm_wait() take the vm_object argument which specifies the domain set to wait for the min condition pass. If there is no object associated with the wait, use curthread' policy
vm_wait() rework.
Make vm_wait() take the vm_object argument which specifies the domain set to wait for the min condition pass. If there is no object associated with the wait, use curthread' policy domainset. The mechanics of the wait in vm_wait() and vm_wait_domain() is supplied by the new helper vm_wait_doms(), which directly takes the bitmask of the domains to wait for passing min condition.
Eliminate pagedaemon_wait(). vm_domain_clear() handles the same operations.
Eliminate VM_WAIT and VM_WAITPFAULT macros, the direct functions calls are enough.
Eliminate several control state variables from vm_domain, unneeded after the vm_wait() conversion.
Scetched and reviewed by: jeff Tested by: pho Sponsored by: The FreeBSD Foundation, Mellanox Technologies Differential revision: https://reviews.freebsd.org/D14384
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
a0a23564 |
| 26-Dec-2016 |
Michal Meloun <mmel@FreeBSD.org> |
Implement drivers for NVIDIA tegra124 display controller, HDMI source and host1x module. Unfortunately, tegra124 SoC doesn't have 2D acceleration engine and 3D requires not yet started nouveau driver
Implement drivers for NVIDIA tegra124 display controller, HDMI source and host1x module. Unfortunately, tegra124 SoC doesn't have 2D acceleration engine and 3D requires not yet started nouveau driver.
These drivers forms a first non-x86 DRM2 enabled graphic stack.
Note, there are 2 outstanding issues: - The code uses gross hack in order to be comply with OBJT_MGTDEVICE pager. (See tegra_bo_init_pager() in tegra_bo.c) - Due to improper(probably) refcounting in drm_gem_mmap_single() (in drm_gem.c), the gem objects are never released. I hope that I will be able to address both issues in finite time, but I don't want to touch x86 world now.
MFC after: 1 month
show more ...
|