aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2006-04-18 20:17:32 +0000
committerPeter Wemm <peter@FreeBSD.org>2006-04-18 20:17:32 +0000
commit714d4fe9b653362a951827aa5cc2f1b4106f1a8e (patch)
tree8546a4f5c5f761a2243859bcedbb96f514981884 /sys/amd64
parentbac58593f12df897c6c8cf743760a9c11fe51db5 (diff)
downloadsrc-714d4fe9b653362a951827aa5cc2f1b4106f1a8e.tar.gz
src-714d4fe9b653362a951827aa5cc2f1b4106f1a8e.zip
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.
Notes
Notes: svn path=/head/; revision=157850
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 6ff0a28af26c..9d0f042769a0 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);
}