Date: Sun, 7 Jul 2019 17:45:17 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349812 - stable/12/sys/vm Message-ID: <201907071745.x67HjHoI043452@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sun Jul 7 17:45:17 2019 New Revision: 349812 URL: https://svnweb.freebsd.org/changeset/base/349812 Log: MFC r349671: Cache the next queue element when traversing a page queue. Modified: stable/12/sys/vm/vm_pageout.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_pageout.c ============================================================================== --- stable/12/sys/vm/vm_pageout.c Sun Jul 7 17:43:45 2019 (r349811) +++ stable/12/sys/vm/vm_pageout.c Sun Jul 7 17:45:17 2019 (r349812) @@ -265,7 +265,7 @@ static __always_inline void vm_pageout_collect_batch(struct scan_state *ss, const bool dequeue) { struct vm_pagequeue *pq; - vm_page_t m, marker; + vm_page_t m, marker, n; marker = ss->marker; pq = ss->pq; @@ -276,7 +276,8 @@ vm_pageout_collect_batch(struct scan_state *ss, const vm_pagequeue_lock(pq); for (m = TAILQ_NEXT(marker, plinks.q); m != NULL && ss->scanned < ss->maxscan && ss->bq.bq_cnt < VM_BATCHQUEUE_SIZE; - m = TAILQ_NEXT(m, plinks.q), ss->scanned++) { + m = n, ss->scanned++) { + n = TAILQ_NEXT(m, plinks.q); if ((m->flags & PG_MARKER) == 0) { KASSERT((m->aflags & PGA_ENQUEUED) != 0, ("page %p not enqueued", m));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907071745.x67HjHoI043452>