vm_pager.c (292373) | vm_pager.c (298411) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 50 unchanged lines hidden (view full) --- 59 */ 60 61/* 62 * Paging space routine stubs. Emulates a matchmaker-like interface 63 * for builtin pagers. 64 */ 65 66#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * The Mach Operating System project at Carnegie-Mellon University. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 50 unchanged lines hidden (view full) --- 59 */ 60 61/* 62 * Paging space routine stubs. Emulates a matchmaker-like interface 63 * for builtin pagers. 64 */ 65 66#include <sys/cdefs.h> |
67__FBSDID("$FreeBSD: head/sys/vm/vm_pager.c 292373 2015-12-16 21:30:45Z glebius $"); | 67__FBSDID("$FreeBSD: head/sys/vm/vm_pager.c 298411 2016-04-21 15:38:28Z pfg $"); |
68 69#include <sys/param.h> 70#include <sys/systm.h> 71#include <sys/kernel.h> 72#include <sys/vnode.h> 73#include <sys/bio.h> 74#include <sys/buf.h> 75#include <sys/ucred.h> --- 84 unchanged lines hidden (view full) --- 160 &vnodepagerops, /* OBJT_VNODE */ 161 &devicepagerops, /* OBJT_DEVICE */ 162 &physpagerops, /* OBJT_PHYS */ 163 &deadpagerops, /* OBJT_DEAD */ 164 &sgpagerops, /* OBJT_SG */ 165 &mgtdevicepagerops, /* OBJT_MGTDEVICE */ 166}; 167 | 68 69#include <sys/param.h> 70#include <sys/systm.h> 71#include <sys/kernel.h> 72#include <sys/vnode.h> 73#include <sys/bio.h> 74#include <sys/buf.h> 75#include <sys/ucred.h> --- 84 unchanged lines hidden (view full) --- 160 &vnodepagerops, /* OBJT_VNODE */ 161 &devicepagerops, /* OBJT_DEVICE */ 162 &physpagerops, /* OBJT_PHYS */ 163 &deadpagerops, /* OBJT_DEAD */ 164 &sgpagerops, /* OBJT_SG */ 165 &mgtdevicepagerops, /* OBJT_MGTDEVICE */ 166}; 167 |
168static const int npagers = sizeof(pagertab) / sizeof(pagertab[0]); 169 | |
170/* 171 * Kernel address space for mapping pages. 172 * Used by pagers where KVAs are needed for IO. 173 * 174 * XXX needs to be large enough to support the number of pending async 175 * cleaning requests (NPENDINGIO == 64) * the maximum swap cluster size 176 * (MAXPHYS == 64k) if you want to get the most efficiency. 177 */ --- 6 unchanged lines hidden (view full) --- 184vm_pager_init() 185{ 186 struct pagerops **pgops; 187 188 TAILQ_INIT(&bswlist); 189 /* 190 * Initialize known pagers 191 */ | 168/* 169 * Kernel address space for mapping pages. 170 * Used by pagers where KVAs are needed for IO. 171 * 172 * XXX needs to be large enough to support the number of pending async 173 * cleaning requests (NPENDINGIO == 64) * the maximum swap cluster size 174 * (MAXPHYS == 64k) if you want to get the most efficiency. 175 */ --- 6 unchanged lines hidden (view full) --- 182vm_pager_init() 183{ 184 struct pagerops **pgops; 185 186 TAILQ_INIT(&bswlist); 187 /* 188 * Initialize known pagers 189 */ |
192 for (pgops = pagertab; pgops < &pagertab[npagers]; pgops++) | 190 for (pgops = pagertab; pgops < &pagertab[nitems(pagertab)]; pgops++) |
193 if ((*pgops)->pgo_init != NULL) 194 (*(*pgops)->pgo_init) (); 195} 196 197void 198vm_pager_bufferinit() 199{ 200 struct buf *bp; --- 362 unchanged lines hidden --- | 191 if ((*pgops)->pgo_init != NULL) 192 (*(*pgops)->pgo_init) (); 193} 194 195void 196vm_pager_bufferinit() 197{ 198 struct buf *bp; --- 362 unchanged lines hidden --- |