swap_pager.h (69972) | swap_pager.h (92029) |
---|---|
1/* 2 * Copyright (c) 1990 University of Utah. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90 | 1/* 2 * Copyright (c) 1990 University of Utah. 3 * Copyright (c) 1991 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the Systems Programming Group of the University of Utah Computer 8 * Science Department. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)swap_pager.h 7.1 (Berkeley) 12/5/90 |
39 * $FreeBSD: head/sys/vm/swap_pager.h 69972 2000-12-13 10:01:00Z tanimura $ | 39 * $FreeBSD: head/sys/vm/swap_pager.h 92029 2002-03-10 21:52:48Z eivind $ |
40 */ 41 42/* 43 * Modifications to the block allocation data structure by John S. Dyson 44 * 18 Dec 93. 45 */ 46 47#ifndef _SWAP_PAGER_ --- 13 unchanged lines hidden (view full) --- 61 * 62 * If SWB_NPAGES is 8 and sizeof(char *) == sizeof(daddr_t), our radix 63 * is basically 8. Assuming PAGE_SIZE == 4096, one tree level represents 64 * 32K worth of data, two levels represent 256K, three levels represent 65 * 2 MBytes. This is acceptable. 66 * 67 * Overall memory utilization is about the same as the old swap structure. 68 */ | 40 */ 41 42/* 43 * Modifications to the block allocation data structure by John S. Dyson 44 * 18 Dec 93. 45 */ 46 47#ifndef _SWAP_PAGER_ --- 13 unchanged lines hidden (view full) --- 61 * 62 * If SWB_NPAGES is 8 and sizeof(char *) == sizeof(daddr_t), our radix 63 * is basically 8. Assuming PAGE_SIZE == 4096, one tree level represents 64 * 32K worth of data, two levels represent 256K, three levels represent 65 * 2 MBytes. This is acceptable. 66 * 67 * Overall memory utilization is about the same as the old swap structure. 68 */ |
69 | |
70#define SWCORRECT(n) (sizeof(void *) * (n) / sizeof(daddr_t)) | 69#define SWCORRECT(n) (sizeof(void *) * (n) / sizeof(daddr_t)) |
71 | |
72#define SWAP_META_PAGES (SWB_NPAGES * 2) 73#define SWAP_META_MASK (SWAP_META_PAGES - 1) 74 75struct swblock { 76 struct swblock *swb_hnext; 77 vm_object_t swb_object; 78 vm_pindex_t swb_index; 79 int swb_count; --- 21 unchanged lines hidden (view full) --- 101 */ 102 103void swap_pager_page_removed __P((vm_page_t, vm_object_t)); 104 105/* choose underlying swap device and queue up I/O */ 106struct buf; 107void swstrategy __P((struct buf *bp)); /* probably needs to move elsewhere */ 108 | 70#define SWAP_META_PAGES (SWB_NPAGES * 2) 71#define SWAP_META_MASK (SWAP_META_PAGES - 1) 72 73struct swblock { 74 struct swblock *swb_hnext; 75 vm_object_t swb_object; 76 vm_pindex_t swb_index; 77 int swb_count; --- 21 unchanged lines hidden (view full) --- 99 */ 100 101void swap_pager_page_removed __P((vm_page_t, vm_object_t)); 102 103/* choose underlying swap device and queue up I/O */ 104struct buf; 105void swstrategy __P((struct buf *bp)); /* probably needs to move elsewhere */ 106 |
109#endif 110 | 107#endif /* _KERNEL */ |
111#endif /* _SWAP_PAGER_ */ | 108#endif /* _SWAP_PAGER_ */ |