swap_pager.c (cbd8ec0902a6392eb49f6c2ae5bd79e811e4ce5e) swap_pager.c (fd5d1124e25f9996b0bfbf17156d850d106b27b4)
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * Copyright (c) 1990 University of Utah.
4 * Copyright (c) 1991, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * the Systems Programming Group of the University of Utah Computer

--- 25 unchanged lines hidden (view full) ---

34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
40 *
41 * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * Copyright (c) 1990 University of Utah.
4 * Copyright (c) 1991, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * the Systems Programming Group of the University of Utah Computer

--- 25 unchanged lines hidden (view full) ---

34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
40 *
41 * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
42 * $Id: swap_pager.c,v 1.94 1998/04/29 04:27:59 dyson Exp $
42 * $Id: swap_pager.c,v 1.95 1998/05/04 03:01:42 dyson Exp $
43 */
44
45/*
46 * Quick hack to page to dedicated partition(s).
47 * TODO:
48 * Add multiprocessor locks
49 * Deal with async writes in a better fashion
50 */

--- 1006 unchanged lines hidden (view full) ---

1057
1058 pbgetvp(swapdev_vp, bp);
1059
1060 cnt.v_swapin++;
1061 cnt.v_swappgsin += count;
1062 /*
1063 * perform the I/O
1064 */
43 */
44
45/*
46 * Quick hack to page to dedicated partition(s).
47 * TODO:
48 * Add multiprocessor locks
49 * Deal with async writes in a better fashion
50 */

--- 1006 unchanged lines hidden (view full) ---

1057
1058 pbgetvp(swapdev_vp, bp);
1059
1060 cnt.v_swapin++;
1061 cnt.v_swappgsin += count;
1062 /*
1063 * perform the I/O
1064 */
1065 VOP_STRATEGY(bp);
1065 VOP_STRATEGY(bp->b_vp, bp);
1066
1067 /*
1068 * wait for the sync I/O to complete
1069 */
1070 s = splvm();
1071 while ((bp->b_flags & B_DONE) == 0) {
1072 if (tsleep(bp, PVM, "swread", hz*20)) {
1073 printf("swap_pager: indefinite wait buffer: device: %#x, blkno: %d, size: %d\n",

--- 387 unchanged lines hidden (view full) ---

1461 }
1462
1463 cnt.v_swapout++;
1464 cnt.v_swappgsout += ix;
1465
1466 /*
1467 * perform the I/O
1468 */
1066
1067 /*
1068 * wait for the sync I/O to complete
1069 */
1070 s = splvm();
1071 while ((bp->b_flags & B_DONE) == 0) {
1072 if (tsleep(bp, PVM, "swread", hz*20)) {
1073 printf("swap_pager: indefinite wait buffer: device: %#x, blkno: %d, size: %d\n",

--- 387 unchanged lines hidden (view full) ---

1461 }
1462
1463 cnt.v_swapout++;
1464 cnt.v_swappgsout += ix;
1465
1466 /*
1467 * perform the I/O
1468 */
1469 VOP_STRATEGY(bp);
1469 VOP_STRATEGY(bp->b_vp, bp);
1470 if (sync == FALSE) {
1471 if (swap_pager_free_pending) {
1472 swap_pager_sync();
1473 }
1474 for (i = firstidx; i < lastidx; i++) {
1475 rtvals[i] = VM_PAGER_PEND;
1476 }
1477 return VM_PAGER_PEND;

--- 210 unchanged lines hidden ---
1470 if (sync == FALSE) {
1471 if (swap_pager_free_pending) {
1472 swap_pager_sync();
1473 }
1474 for (i = firstidx; i < lastidx; i++) {
1475 rtvals[i] = VM_PAGER_PEND;
1476 }
1477 return VM_PAGER_PEND;

--- 210 unchanged lines hidden ---