vm_fault.c (bccdea450b37005ada49d974baff95be1d8821c7) | vm_fault.c (725441f69ba10d59dd2bb8fe5e03d6220b5d08bf) |
---|---|
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 * --- 278 unchanged lines hidden (view full) --- 287 int alloc_req, era, faultcount, nera, result; 288 boolean_t growstack, is_first_object_locked, wired; 289 int map_generation; 290 vm_object_t next_object; 291 int hardfault; 292 struct faultstate fs; 293 struct vnode *vp; 294 vm_page_t m; | 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 * --- 278 unchanged lines hidden (view full) --- 287 int alloc_req, era, faultcount, nera, result; 288 boolean_t growstack, is_first_object_locked, wired; 289 int map_generation; 290 vm_object_t next_object; 291 int hardfault; 292 struct faultstate fs; 293 struct vnode *vp; 294 vm_page_t m; |
295 int ahead, behind, cluster_offset, error, locked; | 295 int ahead, behind, cluster_offset, dead, error, locked; |
296 297 hardfault = 0; 298 growstack = TRUE; 299 PCPU_INC(cnt.v_vm_faults); 300 fs.vp = NULL; 301 faultcount = 0; 302 303RetryFault:; --- 112 unchanged lines hidden (view full) --- 416 417 /* 418 * Search for the page at object/offset. 419 */ 420 fs.object = fs.first_object; 421 fs.pindex = fs.first_pindex; 422 while (TRUE) { 423 /* | 296 297 hardfault = 0; 298 growstack = TRUE; 299 PCPU_INC(cnt.v_vm_faults); 300 fs.vp = NULL; 301 faultcount = 0; 302 303RetryFault:; --- 112 unchanged lines hidden (view full) --- 416 417 /* 418 * Search for the page at object/offset. 419 */ 420 fs.object = fs.first_object; 421 fs.pindex = fs.first_pindex; 422 while (TRUE) { 423 /* |
424 * If the object is dead, we stop here | 424 * If the object is marked for imminent termination, 425 * we retry here, since the collapse pass has raced 426 * with us. Otherwise, if we see terminally dead 427 * object, return fail. |
425 */ | 428 */ |
426 if (fs.object->flags & OBJ_DEAD) { | 429 if ((fs.object->flags & OBJ_DEAD) != 0) { 430 dead = fs.object->type == OBJT_DEAD; |
427 unlock_and_deallocate(&fs); | 431 unlock_and_deallocate(&fs); |
428 return (KERN_PROTECTION_FAILURE); | 432 if (dead) 433 return (KERN_PROTECTION_FAILURE); 434 pause("vmf_de", 1); 435 goto RetryFault; |
429 } 430 431 /* 432 * See if page is resident 433 */ 434 fs.m = vm_page_lookup(fs.object, fs.pindex); 435 if (fs.m != NULL) { 436 /* --- 1014 unchanged lines hidden --- | 436 } 437 438 /* 439 * See if page is resident 440 */ 441 fs.m = vm_page_lookup(fs.object, fs.pindex); 442 if (fs.m != NULL) { 443 /* --- 1014 unchanged lines hidden --- |