ctdb-util: Do not use mlockall() on AIX
authorAmitay Isaacs <amitay@gmail.com>
Tue, 11 Feb 2014 06:57:42 +0000 (17:57 +1100)
committerMartin Schwenke <martins@samba.org>
Tue, 4 Mar 2014 00:02:11 +0000 (01:02 +0100)
Memory lockdown causes recovery daemon to crash on AIX.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/common/ctdb_util.c

index 44eb0db48b0d7862d61c0977737c99ed7b85a0f7..fd0d7da1d8f05e9d5b67a24b8afde4f94cafbf40 100644 (file)
@@ -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;