Deleted Added
full compact
swap_pager.c (108600) swap_pager.c (109623)
1/*
2 * Copyright (c) 1998 Matthew Dillon,
3 * Copyright (c) 1994 John S. Dyson
4 * Copyright (c) 1990 University of Utah.
5 * Copyright (c) 1991, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

59 * cycled (in a high-load system) by the pager. We also do on-the-fly
60 * removal of invalidated swap blocks when a page is destroyed
61 * or renamed.
62 *
63 * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
64 *
65 * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
66 *
1/*
2 * Copyright (c) 1998 Matthew Dillon,
3 * Copyright (c) 1994 John S. Dyson
4 * Copyright (c) 1990 University of Utah.
5 * Copyright (c) 1991, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

59 * cycled (in a high-load system) by the pager. We also do on-the-fly
60 * removal of invalidated swap blocks when a page is destroyed
61 * or renamed.
62 *
63 * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
64 *
65 * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
66 *
67 * $FreeBSD: head/sys/vm/swap_pager.c 108600 2003-01-03 14:30:46Z phk $
67 * $FreeBSD: head/sys/vm/swap_pager.c 109623 2003-01-21 08:56:16Z alfred $
68 */
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/conf.h>
73#include <sys/kernel.h>
74#include <sys/proc.h>
75#include <sys/bio.h>

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

332 * be quite as efficient as the VM system, so we do not use an
333 * oversized hash table.
334 *
335 * n: size of hash table, must be power of 2
336 * swhash_mask: hash table index mask
337 */
338 for (n = 1; n < n2 / 8; n *= 2)
339 ;
68 */
69
70#include <sys/param.h>
71#include <sys/systm.h>
72#include <sys/conf.h>
73#include <sys/kernel.h>
74#include <sys/proc.h>
75#include <sys/bio.h>

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

332 * be quite as efficient as the VM system, so we do not use an
333 * oversized hash table.
334 *
335 * n: size of hash table, must be power of 2
336 * swhash_mask: hash table index mask
337 */
338 for (n = 1; n < n2 / 8; n *= 2)
339 ;
340 swhash = malloc(sizeof(struct swblock *) * n, M_VMPGDATA, M_WAITOK | M_ZERO);
340 swhash = malloc(sizeof(struct swblock *) * n, M_VMPGDATA, M_ZERO);
341 swhash_mask = n - 1;
342}
343
344/*
345 * SWAP_PAGER_ALLOC() - allocate a new OBJT_SWAP VM object and instantiate
346 * its metadata structures.
347 *
348 * This routine is called from the mmap and fork code to create a new

--- 1848 unchanged lines hidden ---
341 swhash_mask = n - 1;
342}
343
344/*
345 * SWAP_PAGER_ALLOC() - allocate a new OBJT_SWAP VM object and instantiate
346 * its metadata structures.
347 *
348 * This routine is called from the mmap and fork code to create a new

--- 1848 unchanged lines hidden ---