Deleted Added
full compact
vm_fault.c (42967) vm_fault.c (43086)
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1994 John S. Dyson
5 * All rights reserved.
6 * Copyright (c) 1994 David Greenman
7 * All rights reserved.
8 *

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

61 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
62 * School of Computer Science
63 * Carnegie Mellon University
64 * Pittsburgh PA 15213-3890
65 *
66 * any improvements or extensions that they make and grant Carnegie the
67 * rights to redistribute these changes.
68 *
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1994 John S. Dyson
5 * All rights reserved.
6 * Copyright (c) 1994 David Greenman
7 * All rights reserved.
8 *

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

61 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
62 * School of Computer Science
63 * Carnegie Mellon University
64 * Pittsburgh PA 15213-3890
65 *
66 * any improvements or extensions that they make and grant Carnegie the
67 * rights to redistribute these changes.
68 *
69 * $Id: vm_fault.c,v 1.94 1999/01/21 08:29:10 dillon Exp $
69 * $Id: vm_fault.c,v 1.95 1999/01/21 09:35:38 dillon Exp $
70 */
71
72/*
73 * Page fault handling module.
74 */
75
76#include <sys/param.h>
77#include <sys/systm.h>

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

304 goto RetryFault;
305 }
306
307 queue = fs.m->queue;
308 s = splvm();
309 vm_page_unqueue_nowakeup(fs.m);
310 splx(s);
311
70 */
71
72/*
73 * Page fault handling module.
74 */
75
76#include <sys/param.h>
77#include <sys/systm.h>

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

304 goto RetryFault;
305 }
306
307 queue = fs.m->queue;
308 s = splvm();
309 vm_page_unqueue_nowakeup(fs.m);
310 splx(s);
311
312#if 0
313 /*
312 /*
314 * Code removed. In a low-memory situation (say, a
315 * memory-bound program is running), the last thing you
316 * do is starve reactivations for other processes.
317 * XXX we need to find a better way.
313 * This code is designed to prevent thrashing in a
314 * low-memory situation by assuming that pages placed
315 * in the cache are generally inactive, so if a cached
316 * page is requested and we are low on memory, we try
317 * to wait for the low-memory condition to be resolved.
318 *
319 * This code cannot handle a major memory starvation
320 * situation where pages are forced into the cache and
321 * may cause 'good' programs to stall. As of 22Jan99
322 * the problem is still under discussion and not
323 * resolved.
318 */
319 if (((queue - fs.m->pc) == PQ_CACHE) &&
320 (cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min) {
321 vm_page_activate(fs.m);
322 unlock_and_deallocate(&fs);
323 VM_WAIT;
324 goto RetryFault;
325 }
324 */
325 if (((queue - fs.m->pc) == PQ_CACHE) &&
326 (cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min) {
327 vm_page_activate(fs.m);
328 unlock_and_deallocate(&fs);
329 VM_WAIT;
330 goto RetryFault;
331 }
326#endif
332
327 /*
328 * Mark page busy for other processes, and the
329 * pagedaemon. If it still isn't completely valid
330 * (readable), jump to readrest, else break-out ( we
331 * found the page ).
332 */
333
334 vm_page_busy(fs.m);

--- 836 unchanged lines hidden ---
333 /*
334 * Mark page busy for other processes, and the
335 * pagedaemon. If it still isn't completely valid
336 * (readable), jump to readrest, else break-out ( we
337 * found the page ).
338 */
339
340 vm_page_busy(fs.m);

--- 836 unchanged lines hidden ---