diff options
author | Olivier Certner <olce@FreeBSD.org> | 2025-09-25 14:40:30 +0000 |
---|---|---|
committer | Olivier Certner <olce@FreeBSD.org> | 2025-10-17 15:18:53 +0000 |
commit | 7b0fe2d405ae09b1247bccc6fa45a6d2755cbe4c (patch) | |
tree | 235b097620138d814fd0a04268e323ff60f92e3f /share/syscons/fonts | |
parent | edbbf26e2650e02cd3925dd1deaacf9b8fb2e2a0 (diff) |
All iterators that rely on an object's 'struct domainset_ref' (field
'domain' on 'struct vm_object'), which is the case for page allocations
with objects, are used with the corresponding object locked for writing,
so cannot lose concurrent iterator index's increases even if those are
made without atomic operations. The only offender was thread stack
allocation, which has just been fixed in commit 3b9b64457676 ("vm: Fix
iterator usage in vm_thread_stack_create()").
However, the interleaved policy would still reset the iterator index
when restarting, losing track of the next domain to allocate from when
applying round-robin, which all allocation policies do if allocation
from the first domain fails.
Fix this last round-robin problem by not resetting the shared index at
iterator's phase init on DOMAINSET_POLICY_INTERLEAVE.
Add an assertion to check that, when passed, an object is write-locked
in order to prevent the problem mentioned in the first paragraph from
reappearing.
Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52733
Diffstat (limited to 'share/syscons/fonts')
0 files changed, 0 insertions, 0 deletions