mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Minor optimization to madvise() MADV_FREE to make page as freeable as
possible without actually unmapping it from the process. As of now, I declare madvise() on OBJT_DEFAULT/OBJT_SWAP objects to be 'working and complete'.
This commit is contained in:
parent
366b60bfed
commit
41c67e12bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43941
@ -61,7 +61,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_object.c,v 1.148 1999/02/08 19:00:15 dillon Exp $
|
||||
* $Id: vm_object.c,v 1.149 1999/02/12 09:51:43 dillon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -844,9 +844,15 @@ vm_object_madvise(object, pindex, count, advise)
|
||||
* Specifically, we do not try to actually free
|
||||
* the page now nor do we try to put it in the
|
||||
* cache (which would cause a page fault on reuse).
|
||||
*
|
||||
* But we do make the page is freeable as we
|
||||
* can without actually taking the step of unmapping
|
||||
* it.
|
||||
*/
|
||||
pmap_clear_modify(VM_PAGE_TO_PHYS(m));
|
||||
m->dirty = 0;
|
||||
m->act_count = 0;
|
||||
vm_page_deactivate(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user