diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 6cdde80bdb8b..e25689ff3cd1 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -4112,7 +4112,12 @@ vm_page_mvqueue(vm_page_t m, const uint8_t nqueue, const uint16_t nflag) if (nqueue == PQ_ACTIVE) new.act_count = max(old.act_count, ACT_INIT); if (old.queue == nqueue) { - if (nqueue != PQ_ACTIVE) + /* + * There is no need to requeue pages already in the + * active queue. + */ + if (nqueue != PQ_ACTIVE || + (old.flags & PGA_ENQUEUED) == 0) new.flags |= nflag; } else { new.flags |= nflag;