diff options
author | peter <peter@FreeBSD.org> | 2002-07-12 04:38:51 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-07-12 04:38:51 +0000 |
commit | 5f510a2bacb55131230e893c7bebcb201650cffa (patch) | |
tree | 96e4456bd6a92818548fc985bfdcc0e885f7be26 /sys | |
parent | f5dfaef1588ffe1587efcb0ad452c98b1ec2419f (diff) | |
download | FreeBSD-src-5f510a2bacb55131230e893c7bebcb201650cffa.zip FreeBSD-src-5f510a2bacb55131230e893c7bebcb201650cffa.tar.gz |
Avoid a vm_page_lookup() - that uses a spinlock protected hash. We can
just use the object's memq for our nefarious purposes.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_glue.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index ceae013..505d1e3 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -319,10 +319,13 @@ vm_proc_swapin(struct proc *p) rv = vm_pager_get_pages(upobj, &m, 1, 0); if (rv != VM_PAGER_OK) panic("vm_proc_swapin: cannot get upage"); - m = vm_page_lookup(upobj, i); - m->valid = VM_PAGE_BITS_ALL; } ma[i] = m; + } + if (upobj->resident_page_count != UAREA_PAGES) + panic("vm_proc_swapin: lost pages from upobj"); + TAILQ_FOREACH(m, &upobj->memq, listq) { + m->valid = VM_PAGE_BITS_ALL; vm_page_wire(m); vm_page_wakeup(m); vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE); |