View | Details | Raw Unified | Return to bug 256507 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/vm/vm_page.c (-2 / +8 lines)
Lines 4167-4173 vm_page_mvqueue(vm_page_t m, const uint8_t nqueue, const uint16_t nflag) Link Here
4167
		if (nqueue == PQ_ACTIVE)
4167
		if (nqueue == PQ_ACTIVE)
4168
			new.act_count = max(old.act_count, ACT_INIT);
4168
			new.act_count = max(old.act_count, ACT_INIT);
4169
		if (old.queue == nqueue) {
4169
		if (old.queue == nqueue) {
4170
			if (nqueue != PQ_ACTIVE)
4170
			/*
4171
			 * There is no need to requeue pages already in the
4172
			 * active queue.
4173
			 */
4174
			if (nqueue != PQ_ACTIVE ||
4175
			    (old.flags & PGA_ENQUEUED) == 0)
4171
				new.flags |= nflag;
4176
				new.flags |= nflag;
4172
		} else {
4177
		} else {
4173
			new.flags |= nflag;
4178
			new.flags |= nflag;
Lines 4264-4270 vm_page_release_toq(vm_page_t m, uint8_t nqueue, const bool noreuse) Link Here
4264
		 * referenced and avoid any queue operations.
4269
		 * referenced and avoid any queue operations.
4265
		 */
4270
		 */
4266
		new.flags &= ~PGA_QUEUE_OP_MASK;
4271
		new.flags &= ~PGA_QUEUE_OP_MASK;
4267
		if (nflag != PGA_REQUEUE_HEAD && old.queue == PQ_ACTIVE)
4272
		if (nflag != PGA_REQUEUE_HEAD && old.queue == PQ_ACTIVE &&
4273
		    (old.flags & PGA_ENQUEUED) != 0)
4268
			new.flags |= PGA_REFERENCED;
4274
			new.flags |= PGA_REFERENCED;
4269
		else {
4275
		else {
4270
			new.flags |= nflag;
4276
			new.flags |= nflag;

Return to bug 256507