summaryrefslogtreecommitdiffstats
path: root/ctdb/configure.ac
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-12-16 20:57:20 +1030
committerRusty Russell <rusty@rustcorp.com.au>2009-12-16 20:57:20 +1030
commitaf2613e16f071c4f119d4c72275a29a3777c626c (patch)
tree8813d2d2d964ed2928329f7329beb5363b37b8bb /ctdb/configure.ac
parentc488ba440ad33a89dc2b1d7b3e5146ee53150847 (diff)
downloadsamba-af2613e16f071c4f119d4c72275a29a3777c626c.tar.gz
samba-af2613e16f071c4f119d4c72275a29a3777c626c.tar.xz
samba-af2613e16f071c4f119d4c72275a29a3777c626c.zip
ctdb: use mlockall, cautiously
We don't want ctdb stalling due to paging; this can be far worse than scheduling delays. But if we simply do mlockall(MCL_FUTURE), it increases the risk that mmap (ie. tdb open) or malloc will fail, causing us to abort. This patch is a compromise: we mlock all current pages (including 10k of future stack for expansion) and then relock when a client asks us to open a TDB. We warn, but don't exit, if it fails. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 82f778e85440bc713d3f87c08ddc955d3cfce926)
Diffstat (limited to 'ctdb/configure.ac')
-rw-r--r--ctdb/configure.ac1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/configure.ac b/ctdb/configure.ac
index aaec420c086..d4098a6a5ac 100644
--- a/ctdb/configure.ac
+++ b/ctdb/configure.ac
@@ -71,6 +71,7 @@ m4_include(ib/config.m4)
AC_CHECK_HEADERS(sched.h)
AC_CHECK_FUNCS(sched_setscheduler)
+AC_CHECK_FUNCS(mlockall)
AC_CACHE_CHECK([for sin_len in sock],ctdb_cv_HAVE_SOCK_SIN_LEN,[
AC_TRY_COMPILE([#include <sys/types.h>