vm_fault.c (eee9d992319ff5a97ff5bf09c16463babee31e70) | vm_fault.c (a6e38685f35f7a25c1c49b9da580b245d21ff3d7) |
---|---|
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 * --- 326 unchanged lines hidden (view full) --- 335 * Reference the page before unlocking and 336 * sleeping so that the page daemon is less 337 * likely to reclaim it. 338 */ 339 vm_page_lock_queues(); 340 vm_page_flag_set(fs.m, PG_REFERENCED); 341 vm_page_unlock_queues(); 342 vm_page_unlock(fs.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 * --- 326 unchanged lines hidden (view full) --- 335 * Reference the page before unlocking and 336 * sleeping so that the page daemon is less 337 * likely to reclaim it. 338 */ 339 vm_page_lock_queues(); 340 vm_page_flag_set(fs.m, PG_REFERENCED); 341 vm_page_unlock_queues(); 342 vm_page_unlock(fs.m); |
343 VM_OBJECT_UNLOCK(fs.object); | |
344 if (fs.object != fs.first_object) { | 343 if (fs.object != fs.first_object) { |
345 VM_OBJECT_LOCK(fs.first_object); | 344 if (!VM_OBJECT_TRYLOCK( 345 fs.first_object)) { 346 VM_OBJECT_UNLOCK(fs.object); 347 VM_OBJECT_LOCK(fs.first_object); 348 VM_OBJECT_LOCK(fs.object); 349 } |
346 vm_page_lock(fs.first_m); 347 vm_page_free(fs.first_m); 348 vm_page_unlock(fs.first_m); 349 vm_object_pip_wakeup(fs.first_object); 350 VM_OBJECT_UNLOCK(fs.first_object); 351 fs.first_m = NULL; 352 } 353 unlock_map(&fs); | 350 vm_page_lock(fs.first_m); 351 vm_page_free(fs.first_m); 352 vm_page_unlock(fs.first_m); 353 vm_object_pip_wakeup(fs.first_object); 354 VM_OBJECT_UNLOCK(fs.first_object); 355 fs.first_m = NULL; 356 } 357 unlock_map(&fs); |
354 VM_OBJECT_LOCK(fs.object); | |
355 if (fs.m == vm_page_lookup(fs.object, 356 fs.pindex)) { 357 vm_page_sleep_if_busy(fs.m, TRUE, 358 "vmpfw"); 359 } 360 vm_object_pip_wakeup(fs.object); 361 VM_OBJECT_UNLOCK(fs.object); 362 PCPU_INC(cnt.v_intrans); --- 1032 unchanged lines hidden --- | 358 if (fs.m == vm_page_lookup(fs.object, 359 fs.pindex)) { 360 vm_page_sleep_if_busy(fs.m, TRUE, 361 "vmpfw"); 362 } 363 vm_object_pip_wakeup(fs.object); 364 VM_OBJECT_UNLOCK(fs.object); 365 PCPU_INC(cnt.v_intrans); --- 1032 unchanged lines hidden --- |