aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/vmmeter.h
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2018-09-06 19:28:52 +0000
committerMark Johnston <markj@FreeBSD.org>2018-09-06 19:28:52 +0000
commit23984ce5cd24ce6d4b67bf6ca58b2f81eb6e176d (patch)
tree357c8c461a1eb6473fd6ee4db017cce80b66f064 /sys/sys/vmmeter.h
parent0c0c965a8f1982bc7c366490157cec9a38315418 (diff)
downloadsrc-23984ce5cd24ce6d4b67bf6ca58b2f81eb6e176d.tar.gz
src-23984ce5cd24ce6d4b67bf6ca58b2f81eb6e176d.zip
Avoid resource deadlocks when one domain has exhausted its memory. Attempt
other allowed domains if the requested domain is below the minimum paging threshold. Block in fork only if all domains available to the forking thread are below the severe threshold rather than any. Submitted by: jeff Reported by: mjg Reviewed by: alc, kib, markj Approved by: re (rgrimes) Differential Revision: https://reviews.freebsd.org/D16191
Notes
Notes: svn path=/head/; revision=338507
Diffstat (limited to 'sys/sys/vmmeter.h')
-rw-r--r--sys/sys/vmmeter.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h
index 3c570b0a6b7f..c41b151fa502 100644
--- a/sys/sys/vmmeter.h
+++ b/sys/sys/vmmeter.h
@@ -187,6 +187,13 @@ vm_page_count_severe(void)
return (!DOMAINSET_EMPTY(&vm_severe_domains));
}
+static inline int
+vm_page_count_severe_set(domainset_t *mask)
+{
+
+ return (DOMAINSET_SUBSET(&vm_severe_domains, mask));
+}
+
/*
* Return TRUE if we are under our minimum low-free-pages threshold.
*