mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-23 16:01:42 +00:00
The per-page act_count can be made very-easily protected by the
per-page lock rather than vm_object lock, without any further overhead. Make the formal switch. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
This commit is contained in:
parent
bc403f030d
commit
a15f7df5de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249278
sys/vm
@ -143,7 +143,7 @@ struct vm_page {
|
||||
uint8_t aflags; /* access is atomic */
|
||||
uint8_t oflags; /* page VPO_* flags (O) */
|
||||
uint16_t flags; /* page PG_* flags (P) */
|
||||
u_char act_count; /* page usage count (O) */
|
||||
u_char act_count; /* page usage count (P) */
|
||||
u_char busy; /* page busy count (O) */
|
||||
/* NOTE that these must support one bit per DEV_BSIZE in a page!!! */
|
||||
/* so, on normal X86 kernels, they must be at least 8 bits wide */
|
||||
|
@ -1015,9 +1015,9 @@ vm_pageout_scan(int pass)
|
||||
} else if ((m->aflags & PGA_REFERENCED) == 0 &&
|
||||
(actcount = pmap_ts_referenced(m)) != 0) {
|
||||
vm_page_activate(m);
|
||||
vm_page_unlock(m);
|
||||
m->act_count += actcount + ACT_ADVANCE;
|
||||
VM_OBJECT_WUNLOCK(object);
|
||||
m->act_count += actcount + ACT_ADVANCE;
|
||||
vm_page_unlock(m);
|
||||
goto relock_queues;
|
||||
}
|
||||
|
||||
@ -1031,9 +1031,9 @@ vm_pageout_scan(int pass)
|
||||
vm_page_aflag_clear(m, PGA_REFERENCED);
|
||||
actcount = pmap_ts_referenced(m);
|
||||
vm_page_activate(m);
|
||||
vm_page_unlock(m);
|
||||
m->act_count += actcount + ACT_ADVANCE + 1;
|
||||
VM_OBJECT_WUNLOCK(object);
|
||||
m->act_count += actcount + ACT_ADVANCE + 1;
|
||||
vm_page_unlock(m);
|
||||
goto relock_queues;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user