From: Maria Matejka Date: Mon, 23 Jan 2023 18:51:24 +0000 (+0100) Subject: Merge commit '928a1cb034e6f9e8edcdd1dc07264cd703e00827' into thread-next X-Git-Tag: v3.0-alpha1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21b772fd4394feeb875121051c868eb9b738cb48;p=thirdparty%2Fbird.git Merge commit '928a1cb034e6f9e8edcdd1dc07264cd703e00827' into thread-next --- 21b772fd4394feeb875121051c868eb9b738cb48 diff --cc sysdep/unix/alloc.c index 3ea10c32f,5d9c6bcd6..030fb9c15 --- a/sysdep/unix/alloc.c +++ b/sysdep/unix/alloc.c @@@ -293,7 -222,15 +297,13 @@@ page_cleanup(void *_ UNUSED void resource_sys_init(void) { + #ifdef CONFIG_DISABLE_THP + /* Disable transparent huge pages, they do not work properly with madvice(MADV_DONTNEED) */ + if (prctl(PR_SET_THP_DISABLE, (unsigned long) 1, (unsigned long) 0, (unsigned long) 0, (unsigned long) 0) < 0) + die("prctl(PR_SET_THP_DISABLE) failed: %m"); + #endif + #ifdef HAVE_MMAP - ASSERT_DIE(global_free_pages.cnt == 0); - /* Check what page size the system supports */ if (!(page_size = sysconf(_SC_PAGESIZE))) die("System page size must be non-zero");