summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2006-01-27 07:28:51 +0000
committeralc <alc@FreeBSD.org>2006-01-27 07:28:51 +0000
commitd2566b1431297b83680432da2ad266b9c391a10e (patch)
tree8fa35c4596918d250fbfc39cbd93eb3d90832dab
parent7d53fc1d66c6b5d6dc093d7ce63083abaf865e0b (diff)
downloadFreeBSD-src-d2566b1431297b83680432da2ad266b9c391a10e.zip
FreeBSD-src-d2566b1431297b83680432da2ad266b9c391a10e.tar.gz
Use the new macros abstracting the page coloring/queues implementation.
(There are no functional changes.)
-rw-r--r--sys/vm/vm_map.c2
-rw-r--r--sys/vm/vm_object.c8
-rw-r--r--sys/vm/vm_pageout.c4
-rw-r--r--sys/vm/vm_pageq.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index acf3b38..23fc7b4 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1426,7 +1426,7 @@ vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot,
are_queues_locked = TRUE;
vm_page_lock_queues();
}
- if ((p->queue - p->pc) == PQ_CACHE)
+ if (VM_PAGE_INQUEUE1(p, PQ_CACHE))
vm_page_deactivate(p);
mpte = pmap_enter_quick(map->pmap,
addr + ptoa(tmpidx), p, prot, mpte);
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 60ede1d..b1329ba 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -719,7 +719,7 @@ vm_object_page_clean(vm_object_t object, vm_pindex_t start, vm_pindex_t end, int
curgeneration = object->generation;
p = vm_page_lookup(object, tscan);
if (p == NULL || p->valid == 0 ||
- (p->queue - p->pc) == PQ_CACHE) {
+ VM_PAGE_INQUEUE1(p, PQ_CACHE)) {
if (--scanlimit == 0)
break;
++tscan;
@@ -808,7 +808,7 @@ again:
if (((p->flags & PG_CLEANCHK) == 0) ||
(pi < tstart) || (pi >= tend) ||
(p->valid == 0) ||
- ((p->queue - p->pc) == PQ_CACHE)) {
+ VM_PAGE_INQUEUE1(p, PQ_CACHE)) {
vm_page_flag_clear(p, PG_CLEANCHK);
continue;
}
@@ -886,7 +886,7 @@ vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration,
(tp->flags & PG_CLEANCHK) == 0) ||
(tp->busy != 0))
break;
- if((tp->queue - tp->pc) == PQ_CACHE) {
+ if (VM_PAGE_INQUEUE1(tp, PQ_CACHE)) {
vm_page_flag_clear(tp, PG_CLEANCHK);
break;
}
@@ -914,7 +914,7 @@ vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration,
(tp->flags & PG_CLEANCHK) == 0) ||
(tp->busy != 0))
break;
- if ((tp->queue - tp->pc) == PQ_CACHE) {
+ if (VM_PAGE_INQUEUE1(tp, PQ_CACHE)) {
vm_page_flag_clear(tp, PG_CLEANCHK);
break;
}
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 9d29de3..00fc2ef 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -337,7 +337,7 @@ more:
ib = 0;
break;
}
- if (((p->queue - p->pc) == PQ_CACHE) ||
+ if (VM_PAGE_INQUEUE1(p, PQ_CACHE) ||
(p->flags & (PG_BUSY|PG_UNMANAGED)) || p->busy) {
ib = 0;
break;
@@ -367,7 +367,7 @@ more:
if ((p = vm_page_lookup(object, pindex + is)) == NULL)
break;
- if (((p->queue - p->pc) == PQ_CACHE) ||
+ if (VM_PAGE_INQUEUE1(p, PQ_CACHE) ||
(p->flags & (PG_BUSY|PG_UNMANAGED)) || p->busy) {
break;
}
diff --git a/sys/vm/vm_pageq.c b/sys/vm/vm_pageq.c
index dfc472d..1c042dd 100644
--- a/sys/vm/vm_pageq.c
+++ b/sys/vm/vm_pageq.c
@@ -277,7 +277,7 @@ vm_pageq_remove(vm_page_t m)
TAILQ_REMOVE(&pq->pl, m, pageq);
(*pq->cnt)--;
pq->lcnt--;
- if ((queue - m->pc) == PQ_CACHE) {
+ if (VM_PAGE_RESOLVEQUEUE(m, queue) == PQ_CACHE) {
if (vm_paging_needed())
pagedaemon_wakeup();
}
OpenPOWER on IntegriCloud