Date: Sun, 29 Jan 2006 06:52:47 GMT From: Alan Cox <alc@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 90605 for review Message-ID: <200601290652.k0T6qll7030538@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=90605 Change 90605 by alc@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"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601290652.k0T6qll7030538>