Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2018 13:54:54 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339654 - head/contrib/jemalloc/src
Message-ID:  <201810231354.w9NDssQC042235@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Tue Oct 23 13:54:54 2018
New Revision: 339654
URL: https://svnweb.freebsd.org/changeset/base/339654

Log:
  Pick 676cdd66792ccb629a978837ea2a066d5db342cc from upstream:
  
      Disable runtime detection of lazy purging support on FreeBSD.
  
      The check doesn't seem to serve any purpose here, and this shaves
      off three syscalls on binary startup.
  
  Discussed by:	jasone
  MFC after:	2 weeks
  Sponsored by:	DARPA, AFRL

Modified:
  head/contrib/jemalloc/src/pages.c

Modified: head/contrib/jemalloc/src/pages.c
==============================================================================
--- head/contrib/jemalloc/src/pages.c	Tue Oct 23 13:49:53 2018	(r339653)
+++ head/contrib/jemalloc/src/pages.c	Tue Oct 23 13:54:54 2018	(r339654)
@@ -588,6 +588,11 @@ pages_boot(void) {
 
 	init_thp_state();
 
+#ifdef __FreeBSD__
+	/*
+	 * FreeBSD doesn't need the check; madvise(2) is known to work.
+	 */
+#else
 	/* Detect lazy purge runtime support. */
 	if (pages_can_purge_lazy) {
 		bool committed = false;
@@ -601,6 +606,7 @@ pages_boot(void) {
 		}
 		os_pages_unmap(madv_free_page, PAGE);
 	}
+#endif
 
 	return false;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810231354.w9NDssQC042235>