From af3a168ed3b0dcac4086d2d90bfdef65590b68dc Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 11 Feb 2014 17:57:42 +1100 Subject: [PATCH] ctdb-util: Do not use mlockall() on AIX Memory lockdown causes recovery daemon to crash on AIX. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/common/ctdb_util.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c index 44eb0db48b0..fd0d7da1d8f 100644 --- a/ctdb/common/ctdb_util.c +++ b/ctdb/common/ctdb_util.c @@ -735,7 +735,7 @@ int32_t get_debug_by_desc(const char *desc) * we'd fail to mmap later on. */ void ctdb_lockdown_memory(struct ctdb_context *ctdb) { -#ifdef HAVE_MLOCKALL +#if defined(HAVE_MLOCKALL) && !defined(_AIX_) /* Extra stack, please! */ char dummy[10000]; memset(dummy, 0, sizeof(dummy)); @@ -744,11 +744,6 @@ void ctdb_lockdown_memory(struct ctdb_context *ctdb) return; } - /* TODO: Add a command line option to disable memory lockdown. - * This can be a performance issue on AIX since fork() copies - * all locked memory pages. - */ - /* Ignore when running in local daemons mode */ if (getuid() != 0) { return; -- 2.11.4.GIT