summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2006-04-18 20:17:32 +0000
committerpeter <peter@FreeBSD.org>2006-04-18 20:17:32 +0000
commit6030c4e1a574a6ac0170d4cd06987e2466a39e51 (patch)
tree8546a4f5c5f761a2243859bcedbb96f514981884 /sys/amd64
parentbe61087902fa35ad45a7347915b061fb132c1ce2 (diff)
downloadFreeBSD-src-6030c4e1a574a6ac0170d4cd06987e2466a39e51.zip
FreeBSD-src-6030c4e1a574a6ac0170d4cd06987e2466a39e51.tar.gz
If we're doing a try-alloc of a pv entry and give up early, do not forget
to reduce the pv_entry_count counter. This was found by Tor Egge. In the same email, Tor also pointed out the pv_stats problem in the previous commit, but I'd forgotten about it until I went looking for this email about this allocation problem.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 6ff0a28..9d0f042 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1616,6 +1616,7 @@ get_pv_entry(pmap_t pmap, int try)
m = vm_page_alloc(NULL, colour, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ);
if (m == NULL) {
if (try) {
+ pv_entry_count--;
PV_STAT(pc_chunk_tryfail++);
return (NULL);
}
OpenPOWER on IntegriCloud