vm_fault.c (111937) | vm_fault.c (111977) |
---|---|
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 * $FreeBSD: head/sys/vm/vm_fault.c 111937 2003-03-06 03:41:02Z alc $ | 69 * $FreeBSD: head/sys/vm/vm_fault.c 111977 2003-03-08 06:58:18Z ken $ |
70 */ 71 72/* 73 * Page fault handling module. 74 */ 75#include <sys/param.h> 76#include <sys/systm.h> 77#include <sys/kernel.h> --- 227 unchanged lines hidden (view full) --- 305 /* 306 * See if page is resident 307 */ 308 fs.m = vm_page_lookup(fs.object, fs.pindex); 309 if (fs.m != NULL) { 310 int queue, s; 311 312 /* | 70 */ 71 72/* 73 * Page fault handling module. 74 */ 75#include <sys/param.h> 76#include <sys/systm.h> 77#include <sys/kernel.h> --- 227 unchanged lines hidden (view full) --- 305 /* 306 * See if page is resident 307 */ 308 fs.m = vm_page_lookup(fs.object, fs.pindex); 309 if (fs.m != NULL) { 310 int queue, s; 311 312 /* |
313 * check for page-based copy on write | 313 * check for page-based copy on write. 314 * We check fs.object == fs.first_object so 315 * as to ensure the legacy COW mechanism is 316 * used when the page in question is part of 317 * a shadow object. Otherwise, vm_page_cowfault() 318 * removes the page from the backing object, 319 * which is not what we want. |
314 */ 315 vm_page_lock_queues(); 316 if ((fs.m->cow) && | 320 */ 321 vm_page_lock_queues(); 322 if ((fs.m->cow) && |
317 (fault_type & VM_PROT_WRITE)) { | 323 (fault_type & VM_PROT_WRITE) && 324 (fs.object == fs.first_object)) { |
318 s = splvm(); 319 vm_page_cowfault(fs.m); 320 splx(s); 321 vm_page_unlock_queues(); 322 unlock_things(&fs); 323 goto RetryFault; 324 } 325 --- 916 unchanged lines hidden --- | 325 s = splvm(); 326 vm_page_cowfault(fs.m); 327 splx(s); 328 vm_page_unlock_queues(); 329 unlock_things(&fs); 330 goto RetryFault; 331 } 332 --- 916 unchanged lines hidden --- |