Index: head/sys/vm/vm_pageout.c =================================================================== --- head/sys/vm/vm_pageout.c +++ head/sys/vm/vm_pageout.c @@ -834,6 +834,7 @@ if (new.act_count > ACT_MAX) new.act_count = ACT_MAX; + new.flags &= ~PGA_QUEUE_OP_MASK; new.flags |= PGA_REQUEUE; new.queue = PQ_ACTIVE; if (!vm_page_pqstate_commit(m, &old, new)) @@ -1313,8 +1314,9 @@ */ ps_delta = 0; if (old.queue != PQ_ACTIVE) { - old.queue = PQ_ACTIVE; - old.flags |= PGA_REQUEUE; + new.flags &= ~PGA_QUEUE_OP_MASK; + new.flags |= PGA_REQUEUE; + new.queue = PQ_ACTIVE; } } else { /* @@ -1350,6 +1352,7 @@ ps_delta = 1; } + new.flags &= ~PGA_QUEUE_OP_MASK; new.flags |= PGA_REQUEUE; new.queue = nqueue; } @@ -1560,6 +1563,7 @@ if (new.act_count > ACT_MAX) new.act_count = ACT_MAX; + new.flags &= ~PGA_QUEUE_OP_MASK; new.flags |= PGA_REQUEUE; new.queue = PQ_ACTIVE; if (!vm_page_pqstate_commit(m, &old, new))