mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix a problem in the swap pager that caused some of the pages that
were paged in under low swap space conditions to both loose their backing store and their dirty bits. This would cause pages to be demand zeroed under certain conditions in low VM space conditions and consequential sig-11's or sig-10's. This situation was made worse lately when the level for swap space reclaim threshold was increased.
This commit is contained in:
parent
29798fdb57
commit
45952afcc7
1 changed files with 9 additions and 9 deletions
|
|
@ -39,7 +39,7 @@
|
|||
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
|
||||
*
|
||||
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
|
||||
* $Id: swap_pager.c,v 1.61 1996/03/02 02:54:17 dyson Exp $
|
||||
* $Id: swap_pager.c,v 1.62 1996/03/03 21:11:05 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -1045,6 +1045,11 @@ swap_pager_getpages(object, m, count, reqpage)
|
|||
if (swap_pager_needflags & SWAP_FREE_NEEDED_BY_PAGEOUT)
|
||||
pagedaemon_wakeup();
|
||||
swap_pager_needflags &= ~(SWAP_FREE_NEEDED|SWAP_FREE_NEEDED_BY_PAGEOUT);
|
||||
if (rv == VM_PAGER_OK) {
|
||||
pmap_clear_modify(VM_PAGE_TO_PHYS(m[reqpage]));
|
||||
m[reqpage]->valid = VM_PAGE_BITS_ALL;
|
||||
m[reqpage]->dirty = 0;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* release the physical I/O buffer
|
||||
|
|
@ -1084,9 +1089,9 @@ swap_pager_getpages(object, m, count, reqpage)
|
|||
|
||||
/*
|
||||
* If we're out of swap space, then attempt to free
|
||||
* some whenever pages are brought in. We must clear
|
||||
* the clean flag so that the page contents will be
|
||||
* preserved.
|
||||
* some whenever multiple pages are brought in. We
|
||||
* must set the dirty bits so that the page contents
|
||||
* will be preserved.
|
||||
*/
|
||||
if (SWAPLOW) {
|
||||
for (i = 0; i < count; i++) {
|
||||
|
|
@ -1098,11 +1103,6 @@ swap_pager_getpages(object, m, count, reqpage)
|
|||
swap_pager_ridpages(m, count, reqpage);
|
||||
}
|
||||
}
|
||||
if (rv == VM_PAGER_OK) {
|
||||
pmap_clear_modify(VM_PAGE_TO_PHYS(m[reqpage]));
|
||||
m[reqpage]->valid = VM_PAGE_BITS_ALL;
|
||||
m[reqpage]->dirty = 0;
|
||||
}
|
||||
return (rv);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue