mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
When mdstart_swap() accesses a page that is already in the active queue,
mark the page as referenced rather than calling vm_page_activate(). This allows the page's act_count to grow beyond ACT_INIT and better reflect its usage. (See also r324146, which modified a function used by tmpfs, uiomove_object_page(), to behave in the same way.) Reviewed by: kib, markj MFC after: 2 weeks
This commit is contained in:
parent
10b980e75b
commit
d9ccb9a89f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324189
@ -1111,7 +1111,10 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
|
||||
if (m != NULL) {
|
||||
vm_page_xunbusy(m);
|
||||
vm_page_lock(m);
|
||||
vm_page_activate(m);
|
||||
if (vm_page_active(m))
|
||||
vm_page_reference(m);
|
||||
else
|
||||
vm_page_activate(m);
|
||||
vm_page_unlock(m);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user