diff options
author | jeff <jeff@FreeBSD.org> | 2007-05-18 07:10:50 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2007-05-18 07:10:50 +0000 |
commit | e1996cb9609d2e55a26ee78dddbfce4ba4073b53 (patch) | |
tree | c94b660d4b9246fed8cbeadf7851932258d8b72a /sys/vm/vm_contig.c | |
parent | beb495eff1db0646624feb7071ced7f632ff8869 (diff) | |
download | FreeBSD-src-e1996cb9609d2e55a26ee78dddbfce4ba4073b53.zip FreeBSD-src-e1996cb9609d2e55a26ee78dddbfce4ba4073b53.tar.gz |
- define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating
vmcnts. This can be used to abstract away pcpu details but also changes
to use atomics for all counters now. This means sched lock is no longer
responsible for protecting counts in the switch routines.
Contributed by: Attilio Rao <attilio@FreeBSD.org>
Diffstat (limited to 'sys/vm/vm_contig.c')
-rw-r--r-- | sys/vm/vm_contig.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c index b26c46f..8278c14 100644 --- a/sys/vm/vm_contig.c +++ b/sys/vm/vm_contig.c @@ -204,7 +204,7 @@ again: * Find first page in array that is free, within range, * aligned, and such that the boundary won't be crossed. */ - for (i = start; i < cnt.v_page_count; i++) { + for (i = start; i < VMCNT_GET(page_count); i++) { phys = VM_PAGE_TO_PHYS(&pga[i]); pqtype = pga[i].queue - pga[i].pc; if (((pqtype == PQ_FREE) || (pqtype == PQ_CACHE)) && @@ -217,7 +217,7 @@ again: /* * If the above failed or we will exceed the upper bound, fail. */ - if ((i == cnt.v_page_count) || + if ((i == VMCNT_GET(page_count)) || ((VM_PAGE_TO_PHYS(&pga[i]) + size) > high)) { mtx_unlock(&vm_page_queue_free_mtx); /* |