summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_zeroidle.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-05-31 22:52:15 +0000
committerattilio <attilio@FreeBSD.org>2007-05-31 22:52:15 +0000
commit7dd8ed88a925a943f1963baa072f4b6c6a8c9930 (patch)
tree10bf0f11ceeb18c6b03947eb85223abbbbf9cc67 /sys/vm/vm_zeroidle.c
parent4681b4098bbf12784d009826b2223ace96a2306b (diff)
downloadFreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.zip
FreeBSD-src-7dd8ed88a925a943f1963baa072f4b6c6a8c9930.tar.gz
Revert VMCNT_* operations introduction.
Probabilly, a general approach is not the better solution here, so we should solve the sched_lock protection problems separately. Requested by: alc Approved by: jeff (mentor)
Diffstat (limited to 'sys/vm/vm_zeroidle.c')
-rw-r--r--sys/vm/vm_zeroidle.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/vm/vm_zeroidle.c b/sys/vm/vm_zeroidle.c
index 29144ed..5af84e0 100644
--- a/sys/vm/vm_zeroidle.c
+++ b/sys/vm/vm_zeroidle.c
@@ -90,10 +90,9 @@ vm_page_zero_check(void)
* fast sleeps. We also do not want to be continuously zeroing
* pages because doing so may flush our L1 and L2 caches too much.
*/
- if (zero_state && vm_page_zero_count >=
- ZIDLE_LO(VMCNT_GET(free_count)))
+ if (zero_state && vm_page_zero_count >= ZIDLE_LO(cnt.v_free_count))
return (0);
- if (vm_page_zero_count >= ZIDLE_HI(VMCNT_GET(free_count)))
+ if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count))
return (0);
return (1);
}
@@ -116,7 +115,7 @@ vm_page_zero_idle(void)
vm_pageq_enqueue(PQ_FREE + m->pc, m);
++vm_page_zero_count;
++cnt_prezero;
- if (vm_page_zero_count >= ZIDLE_HI(VMCNT_GET(free_count)))
+ if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count))
zero_state = 1;
}
free_rover = (free_rover + PQ_PRIME2) & PQ_COLORMASK;
OpenPOWER on IntegriCloud