vm_fault.c (de5f6a77657312a9e058a0a362267093cda2db89) | vm_fault.c (65bc79b85ffdf69216696a91e0ec7ff2130e0888) |
---|---|
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.40 1996/01/19 03:59:43 dyson Exp $ | 69 * $Id: vm_fault.c,v 1.41 1996/03/02 02:54:18 dyson Exp $ |
70 */ 71 72/* 73 * Page fault handling module. 74 */ 75 76#include <sys/param.h> 77#include <sys/systm.h> --- 356 unchanged lines hidden (view full) --- 434 object = first_object; 435 pindex = first_pindex; 436 m = first_m; 437 } 438 first_m = NULL; 439 440 if ((m->flags & PG_ZERO) == 0) 441 vm_page_zero_fill(m); | 70 */ 71 72/* 73 * Page fault handling module. 74 */ 75 76#include <sys/param.h> 77#include <sys/systm.h> --- 356 unchanged lines hidden (view full) --- 434 object = first_object; 435 pindex = first_pindex; 436 m = first_m; 437 } 438 first_m = NULL; 439 440 if ((m->flags & PG_ZERO) == 0) 441 vm_page_zero_fill(m); |
442 m->valid = VM_PAGE_BITS_ALL; | |
443 cnt.v_zfod++; 444 break; 445 } else { 446 if (object != first_object) { 447 vm_object_pip_wakeup(object); 448 } 449 object = next_object; 450 object->paging_in_progress++; --- 57 unchanged lines hidden (view full) --- 508 vm_page_protect(first_m, VM_PROT_NONE); 509 PAGE_WAKEUP(first_m); 510 vm_page_free(first_m); 511 /* 512 * grab the page and put it into the process'es object 513 */ 514 vm_page_rename(m, first_object, first_pindex); 515 first_m = m; | 442 cnt.v_zfod++; 443 break; 444 } else { 445 if (object != first_object) { 446 vm_object_pip_wakeup(object); 447 } 448 object = next_object; 449 object->paging_in_progress++; --- 57 unchanged lines hidden (view full) --- 507 vm_page_protect(first_m, VM_PROT_NONE); 508 PAGE_WAKEUP(first_m); 509 vm_page_free(first_m); 510 /* 511 * grab the page and put it into the process'es object 512 */ 513 vm_page_rename(m, first_object, first_pindex); 514 first_m = m; |
516 m->valid = VM_PAGE_BITS_ALL; | |
517 m->dirty = VM_PAGE_BITS_ALL; 518 m = NULL; 519 ++vm_fault_copy_save_1; 520 } else { 521 /* 522 * Oh, well, lets copy it. 523 */ 524 vm_page_copy(m, first_m); | 515 m->dirty = VM_PAGE_BITS_ALL; 516 m = NULL; 517 ++vm_fault_copy_save_1; 518 } else { 519 /* 520 * Oh, well, lets copy it. 521 */ 522 vm_page_copy(m, first_m); |
525 first_m->valid = VM_PAGE_BITS_ALL; | |
526 } 527 528 if (lookup_still_valid && 529 /* 530 * make sure that we have two shadow objs 531 */ 532 (object->shadow_count == 2) && 533 /* --- 52 unchanged lines hidden (view full) --- 586 } 587 } else { 588 /* 589 * If the other object doesn't have the page, 590 * then we move it there. 591 */ 592 vm_page_rename(m, other_object, other_pindex); 593 m->dirty = VM_PAGE_BITS_ALL; | 523 } 524 525 if (lookup_still_valid && 526 /* 527 * make sure that we have two shadow objs 528 */ 529 (object->shadow_count == 2) && 530 /* --- 52 unchanged lines hidden (view full) --- 583 } 584 } else { 585 /* 586 * If the other object doesn't have the page, 587 * then we move it there. 588 */ 589 vm_page_rename(m, other_object, other_pindex); 590 m->dirty = VM_PAGE_BITS_ALL; |
594 /* m->valid = VM_PAGE_BITS_ALL; */ | 591 m->valid = VM_PAGE_BITS_ALL; |
595 ++vm_fault_copy_save_2; 596 } 597 } 598 } 599 } 600 601 if (m) { 602 if (m->queue != PQ_ACTIVE) --- 102 unchanged lines hidden (view full) --- 705 */ 706 if (fault_type & VM_PROT_WRITE) { 707 m->dirty = VM_PAGE_BITS_ALL; 708 } 709 } 710 711 m->flags |= PG_MAPPED|PG_REFERENCED; 712 m->flags &= ~PG_ZERO; | 592 ++vm_fault_copy_save_2; 593 } 594 } 595 } 596 } 597 598 if (m) { 599 if (m->queue != PQ_ACTIVE) --- 102 unchanged lines hidden (view full) --- 702 */ 703 if (fault_type & VM_PROT_WRITE) { 704 m->dirty = VM_PAGE_BITS_ALL; 705 } 706 } 707 708 m->flags |= PG_MAPPED|PG_REFERENCED; 709 m->flags &= ~PG_ZERO; |
710 m->valid = VM_PAGE_BITS_ALL; |
|
713 714 pmap_enter(map->pmap, vaddr, VM_PAGE_TO_PHYS(m), prot, wired); 715#if 0 716 if (vp && change_wiring == 0 && wired == 0) 717 pmap_prefault(map->pmap, vaddr, entry, first_object); 718#endif 719 720 /* --- 363 unchanged lines hidden --- | 711 712 pmap_enter(map->pmap, vaddr, VM_PAGE_TO_PHYS(m), prot, wired); 713#if 0 714 if (vp && change_wiring == 0 && wired == 0) 715 pmap_prefault(map->pmap, vaddr, entry, first_object); 716#endif 717 718 /* --- 363 unchanged lines hidden --- |