[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-153-g5a9f668

Steven Danneman sdanneman at samba.org
Wed Mar 4 19:08:34 GMT 2009


The branch, master has been updated
       via  5a9f668dabb62efd70054dc35d19c60d027793b5 (commit)
      from  ddc1864fb22dfcd86e3a8688cfd12e0dccd835da (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 5a9f668dabb62efd70054dc35d19c60d027793b5
Author: Steven Danneman <steven.danneman at isilon.com>
Date:   Wed Mar 4 11:04:31 2009 -0800

    s3: Remove madvise support
    
    This reverts 193be432.  The MADVISE_PROTECT is inherited by all child
    processes and cannot be unset.  The intention of the original patch was
    to protect the parent process, but allow children to be killed in low
    memory.  Since this isn't possible with the current API, reverting the
    whole feature.

-----------------------------------------------------------------------

Summary of changes:
 source3/configure.in |   29 -----------------------------
 source3/lib/util.c   |    7 -------
 2 files changed, 0 insertions(+), 36 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index d67fecc..e48ff34 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4723,35 +4723,6 @@ SMB_LIBRARY(addns, 0, no, [undefined API])
 
 
 #################################################
-# check to see if we should set the protected madvise flag,
-# which will keep smbd alive in low memory conditions
-AC_MSG_CHECKING(whether to protect smbd from being killed in low memory)
-AC_ARG_WITH(madvise-protect,
-[AS_HELP_STRING([--with-madvise-protect], [Include low memory madvise protection (default=no)])],
-[ case "$withval" in
-  yes)
-    AC_TRY_COMPILE([
-        #include <sys/mman.h>
-        ],[
-        int a = MADV_PROTECT;
-        ],
-        [samba_cv_madvise_protect=yes],
-        [samba_cv_madvise_protect=no])
-    if test x"$samba_cv_madvise_protect" = x"yes"; then
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(WITH_MADVISE_PROTECTED,1,[Whether to include low memory protection support])
-    else
-        AC_MSG_ERROR(Low memory protection supporte requires availability of MADVISE_PROTECT flag.)
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
-
-#################################################
 # these tests are taken from the GNU fileutils package
 AC_CHECKING(how to get filesystem space usage)
 space=no
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 89f7be8..ec794ca 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -899,13 +899,6 @@ bool reinit_after_fork(struct messaging_context *msg_ctx,
 	 * numbers as each other */
 	set_need_random_reseed();
 
-#ifdef WITH_MADVISE_PROTECTED
-	/* Protect parent process from being killed by kernel when system
-	 * memory is low.  Child processes can still be killed */
-	if(!parent_longlived)
-		madvise(NULL,0,MADV_PROTECT);
-#endif
-
 	/* tdb needs special fork handling */
 	if (tdb_reopen_all(parent_longlived ? 1 : 0) == -1) {
 		DEBUG(0,("tdb_reopen_all failed.\n"));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list