PERFORCE change 90605 for review
Alan Cox
alc at FreeBSD.org
Sat Jan 28 22:52:52 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=90605
Change 90605 by alc at alc_home on 2006/01/29 06:52:39
Parameterize the base queue used by buddy_insert().
Affected files ...
.. //depot/projects/superpages/src/sys/vm/vm_buddy.c#6 edit
Differences ...
==== //depot/projects/superpages/src/sys/vm/vm_buddy.c#6 (text+ko) ====
@@ -106,15 +106,15 @@
*
*/
static __inline void
-buddy_insert(int q, vm_page_t m)
+buddy_insert(int baseq, int q, vm_page_t m)
{
KASSERT(m->queue == PQ_NONE,
("vm_page_buddy_insert: page %p has unexpected queue %d",
m, m->queue));
m->buddyq = q;
- m->queue = PQ_BUDDY + q;
- if (m->flags & PG_ZERO)
+ m->queue = baseq + q;
+ if (baseq == PQ_CACHE || (m->flags & PG_ZERO) != 0)
TAILQ_INSERT_TAIL(&vm_page_queues[m->queue].pl, m, pageq);
else
TAILQ_INSERT_HEAD(&vm_page_queues[m->queue].pl, m, pageq);
@@ -148,7 +148,7 @@
(1 << (PAGE_SHIFT + q)),
("vm_page_buddy_split: page %p is not page %p's %d buddy",
m_buddy, m, q));
- buddy_insert(q, m_buddy);
+ buddy_insert(PQ_BUDDY, q, m_buddy);
}
}
@@ -249,7 +249,7 @@
pa &= ~((1 << (PAGE_SHIFT + q)) - 1);
m = PHYS_TO_VM_PAGE(pa);
}
- buddy_insert(q, m);
+ buddy_insert(PQ_BUDDY, q, m);
}
/*
@@ -288,7 +288,7 @@
other = buddy;
buddy = phys_to_vm_page(half);
}
- buddy_insert(q, other);
+ buddy_insert(PQ_CACHE, q, other);
}
cnt.v_cache_count--;
KASSERT(buddy == m, ("yyy"));
More information about the p4-projects
mailing list