aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2007-09-25 06:25:06 +0000
committerAlan Cox <alc@FreeBSD.org>2007-09-25 06:25:06 +0000
commit7bfda801a8efe3352862aa54dd5d22cd3c005ac3 (patch)
treed6ef2df64ec2f1114828f2caa046592acbdfad76 /sys/kern
parent977b6507cb88cf79c02bd13f446e6b96dde499aa (diff)
Notes
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exec.c2
-rw-r--r--sys/kern/vfs_bio.c14
2 files changed, 5 insertions, 11 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index b0c107c00616..b3884d063e3d 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -832,7 +832,7 @@ exec_map_first_page(imgp)
vm_page_busy(ma[i]);
} else {
ma[i] = vm_page_alloc(object, i,
- VM_ALLOC_NORMAL);
+ VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED);
if (ma[i] == NULL)
break;
}
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index d66b45dce50a..bb457db5f82b 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2898,7 +2898,8 @@ allocbuf(struct buf *bp, int size)
VM_WAIT;
VM_OBJECT_LOCK(obj);
} else {
- bp->b_flags &= ~B_CACHE;
+ if (m->valid == 0)
+ bp->b_flags &= ~B_CACHE;
bp->b_pages[bp->b_npages] = m;
++bp->b_npages;
}
@@ -2916,20 +2917,13 @@ allocbuf(struct buf *bp, int size)
* vm_fault->getpages->cluster_read->allocbuf
*
*/
- vm_page_lock_queues();
if (vm_page_sleep_if_busy(m, FALSE, "pgtblk"))
continue;
/*
- * We have a good page. Should we wakeup the
- * page daemon?
+ * We have a good page.
*/
- if ((curproc != pageproc) &&
- (VM_PAGE_INQUEUE1(m, PQ_CACHE)) &&
- ((cnt.v_free_count + cnt.v_cache_count) <
- (cnt.v_free_min + cnt.v_cache_min))) {
- pagedaemon_wakeup();
- }
+ vm_page_lock_queues();
vm_page_wire(m);
vm_page_unlock_queues();
bp->b_pages[bp->b_npages] = m;