diff options
author | Alan Cox <alc@FreeBSD.org> | 2025-05-27 08:27:16 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2025-06-08 18:35:56 +0000 |
commit | 1fee99800a79887b9037749a34d09f2acab082c0 (patch) | |
tree | d9daeab873022b954374b2864349563382df3504 /Bindings/power/supply/(public-mirror) | |
parent | 3a427b8320840f1e69779efeccc5898eb2972030 (diff) |
Over the life cycle of a vm_page, its listq field has been used for two
distinct purposes. First, linking together all of the pages allocated
to a vm_object. Recently, c8d56817b80f ("vm_object: drop memq field")
completed the elimination of this use case, using pctrie iterators in
place of iteration over the listq. Second, linking together power-of-
two-sized chunks of free pages within vm_phys. This change eliminates
that use case. In essence, this change reverts vm_phys back to using
the plinks.q field, like it did before 5cd29d0f3cda ("Improve VM page
queue scalability."), but with a twist to maintain scalability. Just
before vm_phys uses the plinks.q field, it ensures that any lazy dequeue
from a paging queue, e.g., PQ_ACTIVE, has completed. Typically, the
dequeue has completed, so vm_page_dequeue() is infrequently called by
vm_freelist_add(). The reason being that vm_phys only needs to use the
plinks.q field within the first page of any power-of-two-sized chunk,
so the rest of the pages can still have pending dequeues until the
chunk is split.
This change saves a non-trivial amount of memory, since we have an
instance of struct vm_page for every dynamically allocatable physical
page.
Bump __FreeBSD_version, since third-party modules that use the inline
accessors in vm_page.h may need to be recompiled.
Reviewed by: dougm, kib, markj
Differential Revision: https://reviews.freebsd.org/D50515
Diffstat (limited to 'Bindings/power/supply/(public-mirror)')
0 files changed, 0 insertions, 0 deletions