diff options
author | gallatin <gallatin@FreeBSD.org> | 2000-12-01 18:55:58 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2000-12-01 18:55:58 +0000 |
commit | d874e25bc3a667ef05fd6d74a3aff0a913b16fa2 (patch) | |
tree | a0b956185e4b2aabfaebdc5392b18657ce77d0bb /sys | |
parent | 47bc202c6da06d5363b81ebc162c4bff623a24ec (diff) | |
download | FreeBSD-src-d874e25bc3a667ef05fd6d74a3aff0a913b16fa2.zip FreeBSD-src-d874e25bc3a667ef05fd6d74a3aff0a913b16fa2.tar.gz |
acquire/release Giant in vm_page_zero_idle(), like on i386
Discused with: jhb
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/vm_machdep.c | 10 | ||||
-rw-r--r-- | sys/powerpc/aim/vm_machdep.c | 10 | ||||
-rw-r--r-- | sys/powerpc/powerpc/vm_machdep.c | 10 |
3 files changed, 6 insertions, 24 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index 1f1a7f2..ba5004d 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -425,9 +425,7 @@ vm_page_zero_idle() if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count)) return(0); -#ifdef SMP - if (KLOCK_ENTER(M_TRY)) { -#endif + if (mtx_try_enter(&Giant, MTX_DEF)) { s = splvm(); m = vm_page_list_find(PQ_FREE, free_rover, FALSE); zero_state = 0; @@ -456,13 +454,9 @@ vm_page_zero_idle() } free_rover = (free_rover + PQ_PRIME2) & PQ_L2_MASK; splx(s); -#ifdef SMP - KLOCK_EXIT; -#endif + mtx_exit(&Giant, MTX_DEF); return (1); -#ifdef SMP } -#endif return (0); } diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index 1f1a7f2..ba5004d 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -425,9 +425,7 @@ vm_page_zero_idle() if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count)) return(0); -#ifdef SMP - if (KLOCK_ENTER(M_TRY)) { -#endif + if (mtx_try_enter(&Giant, MTX_DEF)) { s = splvm(); m = vm_page_list_find(PQ_FREE, free_rover, FALSE); zero_state = 0; @@ -456,13 +454,9 @@ vm_page_zero_idle() } free_rover = (free_rover + PQ_PRIME2) & PQ_L2_MASK; splx(s); -#ifdef SMP - KLOCK_EXIT; -#endif + mtx_exit(&Giant, MTX_DEF); return (1); -#ifdef SMP } -#endif return (0); } diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index 1f1a7f2..ba5004d 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -425,9 +425,7 @@ vm_page_zero_idle() if (vm_page_zero_count >= ZIDLE_HI(cnt.v_free_count)) return(0); -#ifdef SMP - if (KLOCK_ENTER(M_TRY)) { -#endif + if (mtx_try_enter(&Giant, MTX_DEF)) { s = splvm(); m = vm_page_list_find(PQ_FREE, free_rover, FALSE); zero_state = 0; @@ -456,13 +454,9 @@ vm_page_zero_idle() } free_rover = (free_rover + PQ_PRIME2) & PQ_L2_MASK; splx(s); -#ifdef SMP - KLOCK_EXIT; -#endif + mtx_exit(&Giant, MTX_DEF); return (1); -#ifdef SMP } -#endif return (0); } |