swap_pager.c (42408) | swap_pager.c (42453) |
---|---|
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.105 1998/12/29 22:53:51 dt Exp $ | 42 * $Id: swap_pager.c,v 1.106 1999/01/08 17:31:23 eivind 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 */ --- 1241 unchanged lines hidden (view full) --- 1292 swb[i]->swb_locked--; 1293 } 1294 1295 for (i = lastidx; i < count; i++) { 1296 if (swb[i]) 1297 swb[i]->swb_locked--; 1298 } 1299 | 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 */ --- 1241 unchanged lines hidden (view full) --- 1292 swb[i]->swb_locked--; 1293 } 1294 1295 for (i = lastidx; i < count; i++) { 1296 if (swb[i]) 1297 swb[i]->swb_locked--; 1298 } 1299 |
1300#if defined(INVARIANTS) | 1300#ifdef INVARIANTS |
1301 for (i = firstidx; i < lastidx; i++) { 1302 if (reqaddr[i] == SWB_EMPTY) { 1303 printf("I/O to empty block???? -- pindex: %d, i: %d\n", 1304 m[i]->pindex, i); 1305 } 1306 } 1307#endif 1308 --- 34 unchanged lines hidden (view full) --- 1343 } else { 1344 swap_pager_sync(); 1345 } 1346 } 1347 splx(s); 1348 } 1349 1350 spc = TAILQ_FIRST(&swap_pager_free); | 1301 for (i = firstidx; i < lastidx; i++) { 1302 if (reqaddr[i] == SWB_EMPTY) { 1303 printf("I/O to empty block???? -- pindex: %d, i: %d\n", 1304 m[i]->pindex, i); 1305 } 1306 } 1307#endif 1308 --- 34 unchanged lines hidden (view full) --- 1343 } else { 1344 swap_pager_sync(); 1345 } 1346 } 1347 splx(s); 1348 } 1349 1350 spc = TAILQ_FIRST(&swap_pager_free); |
1351 KASSERT(spc, | 1351 KASSERT(spc != NULL, |
1352 ("swap_pager_putpages: free queue is empty, %d expected\n", 1353 swap_pager_free_count)); 1354 TAILQ_REMOVE(&swap_pager_free, spc, spc_list); 1355 swap_pager_free_count--; 1356 1357 kva = spc->spc_kva; 1358 bp = spc->spc_bp; 1359 bzero(bp, sizeof *bp); --- 310 unchanged lines hidden --- | 1352 ("swap_pager_putpages: free queue is empty, %d expected\n", 1353 swap_pager_free_count)); 1354 TAILQ_REMOVE(&swap_pager_free, spc, spc_list); 1355 swap_pager_free_count--; 1356 1357 kva = spc->spc_kva; 1358 bp = spc->spc_bp; 1359 bzero(bp, sizeof *bp); --- 310 unchanged lines hidden --- |