git: 579d698a64af - main - vm_fault: replace tailq with lookup
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Apr 2025 07:18:04 UTC
The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=579d698a64afc79c1daabd9d43d952f1c214df65 commit 579d698a64afc79c1daabd9d43d952f1c214df65 Author: Doug Moore <dougm@FreeBSD.org> AuthorDate: 2025-04-25 07:14:51 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2025-04-25 07:14:51 +0000 vm_fault: replace tailq with lookup Replace a use of TAILQ_NEXT with a pctrie lookup, in order to allow the TAILQ to be elimiated soon. Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D50010 --- sys/vm/vm_fault.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index c096bfaffe73..8531dc9d5196 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -623,9 +623,8 @@ vm_fault_populate(struct faultstate *fs) pager_last); pager_last = map_last; } - for (pidx = pager_first, m = vm_page_lookup(fs->first_object, pidx); - pidx <= pager_last; - pidx += npages, m = TAILQ_NEXT(&m[npages - 1], listq)) { + for (pidx = pager_first; pidx <= pager_last; pidx += npages) { + m = vm_page_lookup(fs->first_object, pidx); vaddr = fs->entry->start + IDX_TO_OFF(pidx) - fs->entry->offset; KASSERT(m != NULL && m->pindex == pidx, ("%s: pindex mismatch", __func__));