2 * Copyright (c) 2002-2006 Rice University
3 * Copyright (c) 2007 Alan L. Cox <alc@cs.rice.edu>
6 * This software was developed for the FreeBSD Project by Alan L. Cox,
7 * Olivier Crameri, Peter Druschel, Sitaram Iyer, and Juan Navarro.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
25 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
28 * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #include <sys/cdefs.h>
33 __FBSDID("$FreeBSD$");
37 #include <sys/param.h>
38 #include <sys/systm.h>
40 #include <sys/kernel.h>
41 #include <sys/malloc.h>
42 #include <sys/mutex.h>
43 #include <sys/queue.h>
45 #include <sys/sysctl.h>
46 #include <sys/vmmeter.h>
47 #include <sys/vnode.h>
52 #include <vm/vm_param.h>
53 #include <vm/vm_kern.h>
54 #include <vm/vm_object.h>
55 #include <vm/vm_page.h>
56 #include <vm/vm_phys.h>
57 #include <vm/vm_reserv.h>
68 struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER];
71 static struct vm_phys_seg vm_phys_segs[VM_PHYSSEG_MAX];
73 static int vm_phys_nsegs;
75 static struct vm_freelist
76 vm_phys_free_queues[VM_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER];
78 static int vm_nfreelists = VM_FREELIST_DEFAULT + 1;
80 static int cnt_prezero;
81 SYSCTL_INT(_vm_stats_misc, OID_AUTO, cnt_prezero, CTLFLAG_RD,
82 &cnt_prezero, 0, "The number of physical pages prezeroed at idle time");
84 static int sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS);
85 SYSCTL_OID(_vm, OID_AUTO, phys_free, CTLTYPE_STRING | CTLFLAG_RD,
86 NULL, 0, sysctl_vm_phys_free, "A", "Phys Free Info");
88 static int sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS);
89 SYSCTL_OID(_vm, OID_AUTO, phys_segs, CTLTYPE_STRING | CTLFLAG_RD,
90 NULL, 0, sysctl_vm_phys_segs, "A", "Phys Seg Info");
92 static void vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind);
93 static int vm_phys_paddr_to_segind(vm_paddr_t pa);
94 static void vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl,
98 * Outputs the state of the physical memory allocator, specifically,
99 * the amount of physical memory in each free list.
102 sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS)
105 struct vm_freelist *fl;
107 const int cbufsize = vm_nfreelists*(VM_NFREEORDER + 1)*81;
108 int error, flind, oind, pind;
110 cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO);
111 sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN);
112 for (flind = 0; flind < vm_nfreelists; flind++) {
113 sbuf_printf(&sbuf, "\nFREE LIST %d:\n"
114 "\n ORDER (SIZE) | NUMBER"
116 for (pind = 0; pind < VM_NFREEPOOL; pind++)
117 sbuf_printf(&sbuf, " | POOL %d", pind);
118 sbuf_printf(&sbuf, "\n-- ");
119 for (pind = 0; pind < VM_NFREEPOOL; pind++)
120 sbuf_printf(&sbuf, "-- -- ");
121 sbuf_printf(&sbuf, "--\n");
122 for (oind = VM_NFREEORDER - 1; oind >= 0; oind--) {
123 sbuf_printf(&sbuf, " %2d (%6dK)", oind,
124 1 << (PAGE_SHIFT - 10 + oind));
125 for (pind = 0; pind < VM_NFREEPOOL; pind++) {
126 fl = vm_phys_free_queues[flind][pind];
127 sbuf_printf(&sbuf, " | %6d", fl[oind].lcnt);
129 sbuf_printf(&sbuf, "\n");
133 error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf));
140 * Outputs the set of physical memory segments.
143 sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS)
146 struct vm_phys_seg *seg;
148 const int cbufsize = VM_PHYSSEG_MAX*(VM_NFREEORDER + 1)*81;
151 cbuf = malloc(cbufsize, M_TEMP, M_WAITOK | M_ZERO);
152 sbuf_new(&sbuf, cbuf, cbufsize, SBUF_FIXEDLEN);
153 for (segind = 0; segind < vm_phys_nsegs; segind++) {
154 sbuf_printf(&sbuf, "\nSEGMENT %d:\n\n", segind);
155 seg = &vm_phys_segs[segind];
156 sbuf_printf(&sbuf, "start: %#jx\n",
157 (uintmax_t)seg->start);
158 sbuf_printf(&sbuf, "end: %#jx\n",
159 (uintmax_t)seg->end);
160 sbuf_printf(&sbuf, "free list: %p\n", seg->free_queues);
163 error = SYSCTL_OUT(req, sbuf_data(&sbuf), sbuf_len(&sbuf));
170 * Create a physical memory segment.
173 vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int flind)
175 struct vm_phys_seg *seg;
176 #ifdef VM_PHYSSEG_SPARSE
181 for (segind = 0; segind < vm_phys_nsegs; segind++) {
182 seg = &vm_phys_segs[segind];
183 pages += atop(seg->end - seg->start);
186 KASSERT(vm_phys_nsegs < VM_PHYSSEG_MAX,
187 ("vm_phys_create_seg: increase VM_PHYSSEG_MAX"));
188 seg = &vm_phys_segs[vm_phys_nsegs++];
191 #ifdef VM_PHYSSEG_SPARSE
192 seg->first_page = &vm_page_array[pages];
194 seg->first_page = PHYS_TO_VM_PAGE(start);
196 seg->free_queues = &vm_phys_free_queues[flind];
200 * Initialize the physical memory allocator.
205 struct vm_freelist *fl;
206 int flind, i, oind, pind;
208 for (i = 0; phys_avail[i + 1] != 0; i += 2) {
209 #ifdef VM_FREELIST_ISADMA
210 if (phys_avail[i] < 16777216) {
211 if (phys_avail[i + 1] > 16777216) {
212 vm_phys_create_seg(phys_avail[i], 16777216,
214 vm_phys_create_seg(16777216, phys_avail[i + 1],
215 VM_FREELIST_DEFAULT);
217 vm_phys_create_seg(phys_avail[i],
218 phys_avail[i + 1], VM_FREELIST_ISADMA);
220 if (VM_FREELIST_ISADMA >= vm_nfreelists)
221 vm_nfreelists = VM_FREELIST_ISADMA + 1;
224 #ifdef VM_FREELIST_HIGHMEM
225 if (phys_avail[i + 1] > VM_HIGHMEM_ADDRESS) {
226 if (phys_avail[i] < VM_HIGHMEM_ADDRESS) {
227 vm_phys_create_seg(phys_avail[i],
228 VM_HIGHMEM_ADDRESS, VM_FREELIST_DEFAULT);
229 vm_phys_create_seg(VM_HIGHMEM_ADDRESS,
230 phys_avail[i + 1], VM_FREELIST_HIGHMEM);
232 vm_phys_create_seg(phys_avail[i],
233 phys_avail[i + 1], VM_FREELIST_HIGHMEM);
235 if (VM_FREELIST_HIGHMEM >= vm_nfreelists)
236 vm_nfreelists = VM_FREELIST_HIGHMEM + 1;
239 vm_phys_create_seg(phys_avail[i], phys_avail[i + 1],
240 VM_FREELIST_DEFAULT);
242 for (flind = 0; flind < vm_nfreelists; flind++) {
243 for (pind = 0; pind < VM_NFREEPOOL; pind++) {
244 fl = vm_phys_free_queues[flind][pind];
245 for (oind = 0; oind < VM_NFREEORDER; oind++)
246 TAILQ_INIT(&fl[oind].pl);
252 * Split a contiguous, power of two-sized set of physical pages.
255 vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order)
259 while (oind > order) {
261 m_buddy = &m[1 << oind];
262 KASSERT(m_buddy->order == VM_NFREEORDER,
263 ("vm_phys_split_pages: page %p has unexpected order %d",
264 m_buddy, m_buddy->order));
265 m_buddy->order = oind;
266 TAILQ_INSERT_HEAD(&fl[oind].pl, m_buddy, pageq);
272 * Initialize a physical page and add it to the free lists.
275 vm_phys_add_page(vm_paddr_t pa)
280 m = vm_phys_paddr_to_vm_page(pa);
282 m->segind = vm_phys_paddr_to_segind(pa);
284 KASSERT(m->order == VM_NFREEORDER,
285 ("vm_phys_add_page: page %p has unexpected order %d",
287 m->pool = VM_FREEPOOL_DEFAULT;
289 mtx_lock(&vm_page_queue_free_mtx);
291 vm_phys_free_pages(m, 0);
292 mtx_unlock(&vm_page_queue_free_mtx);
296 * Allocate a contiguous, power of two-sized set of physical pages
297 * from the free lists.
299 * The free page queues must be locked.
302 vm_phys_alloc_pages(int pool, int order)
307 for (flind = 0; flind < vm_nfreelists; flind++) {
308 m = vm_phys_alloc_freelist_pages(flind, pool, order);
316 * Find and dequeue a free page on the given free list, with the
317 * specified pool and order
320 vm_phys_alloc_freelist_pages(int flind, int pool, int order)
322 struct vm_freelist *fl;
323 struct vm_freelist *alt;
327 KASSERT(flind < VM_NFREELIST,
328 ("vm_phys_alloc_freelist_pages: freelist %d is out of range", flind));
329 KASSERT(pool < VM_NFREEPOOL,
330 ("vm_phys_alloc_freelist_pages: pool %d is out of range", pool));
331 KASSERT(order < VM_NFREEORDER,
332 ("vm_phys_alloc_freelist_pages: order %d is out of range", order));
333 mtx_assert(&vm_page_queue_free_mtx, MA_OWNED);
334 fl = vm_phys_free_queues[flind][pool];
335 for (oind = order; oind < VM_NFREEORDER; oind++) {
336 m = TAILQ_FIRST(&fl[oind].pl);
338 TAILQ_REMOVE(&fl[oind].pl, m, pageq);
340 m->order = VM_NFREEORDER;
341 vm_phys_split_pages(m, oind, fl, order);
347 * The given pool was empty. Find the largest
348 * contiguous, power-of-two-sized set of pages in any
349 * pool. Transfer these pages to the given pool, and
350 * use them to satisfy the allocation.
352 for (oind = VM_NFREEORDER - 1; oind >= order; oind--) {
353 for (pind = 0; pind < VM_NFREEPOOL; pind++) {
354 alt = vm_phys_free_queues[flind][pind];
355 m = TAILQ_FIRST(&alt[oind].pl);
357 TAILQ_REMOVE(&alt[oind].pl, m, pageq);
359 m->order = VM_NFREEORDER;
360 vm_phys_set_pool(pool, m, oind);
361 vm_phys_split_pages(m, oind, fl, order);
370 * Allocate physical memory from phys_avail[].
373 vm_phys_bootstrap_alloc(vm_size_t size, unsigned long alignment)
378 size = round_page(size);
379 for (i = 0; phys_avail[i + 1] != 0; i += 2) {
380 if (phys_avail[i + 1] - phys_avail[i] < size)
383 phys_avail[i] += size;
386 panic("vm_phys_bootstrap_alloc");
390 * Find the vm_page corresponding to the given physical address.
393 vm_phys_paddr_to_vm_page(vm_paddr_t pa)
395 struct vm_phys_seg *seg;
398 for (segind = 0; segind < vm_phys_nsegs; segind++) {
399 seg = &vm_phys_segs[segind];
400 if (pa >= seg->start && pa < seg->end)
401 return (&seg->first_page[atop(pa - seg->start)]);
407 * Find the segment containing the given physical address.
410 vm_phys_paddr_to_segind(vm_paddr_t pa)
412 struct vm_phys_seg *seg;
415 for (segind = 0; segind < vm_phys_nsegs; segind++) {
416 seg = &vm_phys_segs[segind];
417 if (pa >= seg->start && pa < seg->end)
420 panic("vm_phys_paddr_to_segind: paddr %#jx is not in any segment" ,
425 * Free a contiguous, power of two-sized set of physical pages.
427 * The free page queues must be locked.
430 vm_phys_free_pages(vm_page_t m, int order)
432 struct vm_freelist *fl;
433 struct vm_phys_seg *seg;
434 vm_paddr_t pa, pa_buddy;
437 KASSERT(m->order == VM_NFREEORDER,
438 ("vm_phys_free_pages: page %p has unexpected order %d",
440 KASSERT(m->pool < VM_NFREEPOOL,
441 ("vm_phys_free_pages: page %p has unexpected pool %d",
443 KASSERT(order < VM_NFREEORDER,
444 ("vm_phys_free_pages: order %d is out of range", order));
445 mtx_assert(&vm_page_queue_free_mtx, MA_OWNED);
446 pa = VM_PAGE_TO_PHYS(m);
447 seg = &vm_phys_segs[m->segind];
448 while (order < VM_NFREEORDER - 1) {
449 pa_buddy = pa ^ (1 << (PAGE_SHIFT + order));
450 if (pa_buddy < seg->start ||
451 pa_buddy >= seg->end)
453 m_buddy = &seg->first_page[atop(pa_buddy - seg->start)];
454 if (m_buddy->order != order)
456 fl = (*seg->free_queues)[m_buddy->pool];
457 TAILQ_REMOVE(&fl[m_buddy->order].pl, m_buddy, pageq);
458 fl[m_buddy->order].lcnt--;
459 m_buddy->order = VM_NFREEORDER;
460 if (m_buddy->pool != m->pool)
461 vm_phys_set_pool(m->pool, m_buddy, order);
463 pa &= ~((1 << (PAGE_SHIFT + order)) - 1);
464 m = &seg->first_page[atop(pa - seg->start)];
467 fl = (*seg->free_queues)[m->pool];
468 TAILQ_INSERT_TAIL(&fl[order].pl, m, pageq);
473 * Set the pool for a contiguous, power of two-sized set of physical pages.
476 vm_phys_set_pool(int pool, vm_page_t m, int order)
480 for (m_tmp = m; m_tmp < &m[1 << order]; m_tmp++)
485 * Search for the given physical page "m" in the free lists. If the search
486 * succeeds, remove "m" from the free lists and return TRUE. Otherwise, return
487 * FALSE, indicating that "m" is not in the free lists.
489 * The free page queues must be locked.
492 vm_phys_unfree_page(vm_page_t m)
494 struct vm_freelist *fl;
495 struct vm_phys_seg *seg;
496 vm_paddr_t pa, pa_half;
497 vm_page_t m_set, m_tmp;
500 mtx_assert(&vm_page_queue_free_mtx, MA_OWNED);
503 * First, find the contiguous, power of two-sized set of free
504 * physical pages containing the given physical page "m" and
505 * assign it to "m_set".
507 seg = &vm_phys_segs[m->segind];
508 for (m_set = m, order = 0; m_set->order == VM_NFREEORDER &&
509 order < VM_NFREEORDER - 1; ) {
511 pa = m->phys_addr & (~(vm_paddr_t)0 << (PAGE_SHIFT + order));
512 if (pa >= seg->start)
513 m_set = &seg->first_page[atop(pa - seg->start)];
517 if (m_set->order < order)
519 if (m_set->order == VM_NFREEORDER)
521 KASSERT(m_set->order < VM_NFREEORDER,
522 ("vm_phys_unfree_page: page %p has unexpected order %d",
523 m_set, m_set->order));
526 * Next, remove "m_set" from the free lists. Finally, extract
527 * "m" from "m_set" using an iterative algorithm: While "m_set"
528 * is larger than a page, shrink "m_set" by returning the half
529 * of "m_set" that does not contain "m" to the free lists.
531 fl = (*seg->free_queues)[m_set->pool];
532 order = m_set->order;
533 TAILQ_REMOVE(&fl[order].pl, m_set, pageq);
535 m_set->order = VM_NFREEORDER;
538 pa_half = m_set->phys_addr ^ (1 << (PAGE_SHIFT + order));
539 if (m->phys_addr < pa_half)
540 m_tmp = &seg->first_page[atop(pa_half - seg->start)];
543 m_set = &seg->first_page[atop(pa_half - seg->start)];
545 m_tmp->order = order;
546 TAILQ_INSERT_HEAD(&fl[order].pl, m_tmp, pageq);
549 KASSERT(m_set == m, ("vm_phys_unfree_page: fatal inconsistency"));
554 * Try to zero one physical page. Used by an idle priority thread.
557 vm_phys_zero_pages_idle(void)
559 static struct vm_freelist *fl = vm_phys_free_queues[0][0];
560 static int flind, oind, pind;
563 mtx_assert(&vm_page_queue_free_mtx, MA_OWNED);
565 TAILQ_FOREACH_REVERSE(m, &fl[oind].pl, pglist, pageq) {
566 for (m_tmp = m; m_tmp < &m[1 << oind]; m_tmp++) {
567 if ((m_tmp->flags & (PG_CACHED | PG_ZERO)) == 0) {
568 vm_phys_unfree_page(m_tmp);
570 mtx_unlock(&vm_page_queue_free_mtx);
571 pmap_zero_page_idle(m_tmp);
572 m_tmp->flags |= PG_ZERO;
573 mtx_lock(&vm_page_queue_free_mtx);
575 vm_phys_free_pages(m_tmp, 0);
576 vm_page_zero_count++;
583 if (oind == VM_NFREEORDER) {
586 if (pind == VM_NFREEPOOL) {
589 if (flind == vm_nfreelists)
592 fl = vm_phys_free_queues[flind][pind];
598 * Allocate a contiguous set of physical pages of the given size
599 * "npages" from the free lists. All of the physical pages must be at
600 * or above the given physical address "low" and below the given
601 * physical address "high". The given value "alignment" determines the
602 * alignment of the first physical page in the set. If the given value
603 * "boundary" is non-zero, then the set of physical pages cannot cross
604 * any physical address boundary that is a multiple of that value. Both
605 * "alignment" and "boundary" must be a power of two.
608 vm_phys_alloc_contig(unsigned long npages, vm_paddr_t low, vm_paddr_t high,
609 unsigned long alignment, unsigned long boundary)
611 struct vm_freelist *fl;
612 struct vm_phys_seg *seg;
614 vm_paddr_t pa, pa_last, size;
615 vm_page_t deferred_vdrop_list, m, m_ret;
616 int flind, i, oind, order, pind;
618 size = npages << PAGE_SHIFT;
620 ("vm_phys_alloc_contig: size must not be 0"));
621 KASSERT((alignment & (alignment - 1)) == 0,
622 ("vm_phys_alloc_contig: alignment must be a power of 2"));
623 KASSERT((boundary & (boundary - 1)) == 0,
624 ("vm_phys_alloc_contig: boundary must be a power of 2"));
625 deferred_vdrop_list = NULL;
626 /* Compute the queue that is the best fit for npages. */
627 for (order = 0; (1 << order) < npages; order++);
628 mtx_lock(&vm_page_queue_free_mtx);
629 #if VM_NRESERVLEVEL > 0
632 for (flind = 0; flind < vm_nfreelists; flind++) {
633 for (oind = min(order, VM_NFREEORDER - 1); oind < VM_NFREEORDER; oind++) {
634 for (pind = 0; pind < VM_NFREEPOOL; pind++) {
635 fl = vm_phys_free_queues[flind][pind];
636 TAILQ_FOREACH(m_ret, &fl[oind].pl, pageq) {
638 * A free list may contain physical pages
639 * from one or more segments.
641 seg = &vm_phys_segs[m_ret->segind];
642 if (seg->start > high ||
647 * Is the size of this allocation request
648 * larger than the largest block size?
650 if (order >= VM_NFREEORDER) {
652 * Determine if a sufficient number
653 * of subsequent blocks to satisfy
654 * the allocation request are free.
656 pa = VM_PAGE_TO_PHYS(m_ret);
659 pa += 1 << (PAGE_SHIFT + VM_NFREEORDER - 1);
662 if (pa < seg->start ||
665 m = &seg->first_page[atop(pa - seg->start)];
666 if (m->order != VM_NFREEORDER - 1)
669 /* If not, continue to the next block. */
675 * Determine if the blocks are within the given range,
676 * satisfy the given alignment, and do not cross the
679 pa = VM_PAGE_TO_PHYS(m_ret);
682 (pa & (alignment - 1)) == 0 &&
683 ((pa ^ (pa + size - 1)) & ~(boundary - 1)) == 0)
689 #if VM_NRESERVLEVEL > 0
690 if (vm_reserv_reclaim_contig(size, low, high, alignment, boundary))
693 mtx_unlock(&vm_page_queue_free_mtx);
696 for (m = m_ret; m < &m_ret[npages]; m = &m[1 << oind]) {
697 fl = (*seg->free_queues)[m->pool];
698 TAILQ_REMOVE(&fl[m->order].pl, m, pageq);
700 m->order = VM_NFREEORDER;
702 if (m_ret->pool != VM_FREEPOOL_DEFAULT)
703 vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m_ret, oind);
704 fl = (*seg->free_queues)[m_ret->pool];
705 vm_phys_split_pages(m_ret, oind, fl, order);
706 for (i = 0; i < npages; i++) {
708 vp = vm_page_alloc_init(m);
711 * Enqueue the vnode for deferred vdrop().
713 * Unmanaged pages don't use "pageq", so it
714 * can be safely abused to construct a short-
715 * lived queue of vnodes.
717 m->pageq.tqe_prev = (void *)vp;
718 m->pageq.tqe_next = deferred_vdrop_list;
719 deferred_vdrop_list = m;
722 for (; i < roundup2(npages, 1 << imin(oind, order)); i++) {
724 KASSERT(m->order == VM_NFREEORDER,
725 ("vm_phys_alloc_contig: page %p has unexpected order %d",
727 vm_phys_free_pages(m, 0);
729 mtx_unlock(&vm_page_queue_free_mtx);
730 while (deferred_vdrop_list != NULL) {
731 vdrop((struct vnode *)deferred_vdrop_list->pageq.tqe_prev);
732 deferred_vdrop_list = deferred_vdrop_list->pageq.tqe_next;
739 * Show the number of physical pages in each of the free lists.
741 DB_SHOW_COMMAND(freepages, db_show_freepages)
743 struct vm_freelist *fl;
744 int flind, oind, pind;
746 for (flind = 0; flind < vm_nfreelists; flind++) {
747 db_printf("FREE LIST %d:\n"
748 "\n ORDER (SIZE) | NUMBER"
750 for (pind = 0; pind < VM_NFREEPOOL; pind++)
751 db_printf(" | POOL %d", pind);
753 for (pind = 0; pind < VM_NFREEPOOL; pind++)
756 for (oind = VM_NFREEORDER - 1; oind >= 0; oind--) {
757 db_printf(" %2.2d (%6.6dK)", oind,
758 1 << (PAGE_SHIFT - 10 + oind));
759 for (pind = 0; pind < VM_NFREEPOOL; pind++) {
760 fl = vm_phys_free_queues[flind][pind];
761 db_printf(" | %6.6d", fl[oind].lcnt);