swap_pager.c (8b3bc70a2b2d3889f9163e5e5a24747cea6417e6) | swap_pager.c (0012f373e43db2341c20329163ed2d5ad3b0f341) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-4-Clause 3 * 4 * Copyright (c) 1998 Matthew Dillon, 5 * Copyright (c) 1994 John S. Dyson 6 * Copyright (c) 1990 University of Utah. 7 * Copyright (c) 1982, 1986, 1989, 1993 8 * The Regents of the University of California. All rights reserved. --- 1540 unchanged lines hidden (view full) --- 1549 * interrupt. 1550 */ 1551 if (bp->b_iocmd == BIO_READ) { 1552 /* 1553 * NOTE: for reads, m->dirty will probably 1554 * be overridden by the original caller of 1555 * getpages so don't play cute tricks here. 1556 */ | 1/*- 2 * SPDX-License-Identifier: BSD-4-Clause 3 * 4 * Copyright (c) 1998 Matthew Dillon, 5 * Copyright (c) 1994 John S. Dyson 6 * Copyright (c) 1990 University of Utah. 7 * Copyright (c) 1982, 1986, 1989, 1993 8 * The Regents of the University of California. All rights reserved. --- 1540 unchanged lines hidden (view full) --- 1549 * interrupt. 1550 */ 1551 if (bp->b_iocmd == BIO_READ) { 1552 /* 1553 * NOTE: for reads, m->dirty will probably 1554 * be overridden by the original caller of 1555 * getpages so don't play cute tricks here. 1556 */ |
1557 m->valid = 0; | 1557 vm_page_invalid(m); |
1558 } else { 1559 /* 1560 * If a write error occurs, reactivate page 1561 * so it doesn't clog the inactive list, 1562 * then finish the I/O. 1563 */ 1564 MPASS(m->dirty == VM_PAGE_BITS_ALL); 1565 vm_page_lock(m); --- 11 unchanged lines hidden (view full) --- 1577 * that existed in the old swapper for a time before 1578 * it got ripped out due to precisely this problem. 1579 */ 1580 KASSERT(!pmap_page_is_mapped(m), 1581 ("swp_pager_async_iodone: page %p is mapped", m)); 1582 KASSERT(m->dirty == 0, 1583 ("swp_pager_async_iodone: page %p is dirty", m)); 1584 | 1558 } else { 1559 /* 1560 * If a write error occurs, reactivate page 1561 * so it doesn't clog the inactive list, 1562 * then finish the I/O. 1563 */ 1564 MPASS(m->dirty == VM_PAGE_BITS_ALL); 1565 vm_page_lock(m); --- 11 unchanged lines hidden (view full) --- 1577 * that existed in the old swapper for a time before 1578 * it got ripped out due to precisely this problem. 1579 */ 1580 KASSERT(!pmap_page_is_mapped(m), 1581 ("swp_pager_async_iodone: page %p is mapped", m)); 1582 KASSERT(m->dirty == 0, 1583 ("swp_pager_async_iodone: page %p is dirty", m)); 1584 |
1585 m->valid = VM_PAGE_BITS_ALL; | 1585 vm_page_valid(m); |
1586 if (i < bp->b_pgbefore || 1587 i >= bp->b_npages - bp->b_pgafter) 1588 vm_page_readahead_finish(m); 1589 } else { 1590 /* 1591 * For write success, clear the dirty 1592 * status, then finish the I/O ( which decrements the 1593 * busy count and possibly wakes waiter's up ). --- 1432 unchanged lines hidden --- | 1586 if (i < bp->b_pgbefore || 1587 i >= bp->b_npages - bp->b_pgafter) 1588 vm_page_readahead_finish(m); 1589 } else { 1590 /* 1591 * For write success, clear the dirty 1592 * status, then finish the I/O ( which decrements the 1593 * busy count and possibly wakes waiter's up ). --- 1432 unchanged lines hidden --- |