mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-04 16:11:54 +00:00
Merge commit '928a1cb034e6f9e8edcdd1dc07264cd703e00827' into thread-next
This commit is contained in:
commit
21b772fd43
@ -219,7 +219,7 @@ install-docs:
|
||||
|
||||
# Cleanup
|
||||
clean::
|
||||
rm -f $(objdir)/sysdep/paths.h
|
||||
rm -f $(objdir)/sysdep/paths.h $(objdir)/nest/proto-build.c
|
||||
rm -f $(addprefix $(exedir)/,bird birdc birdcl)
|
||||
find $(objdir) -name "*.[od]" -exec rm -f '{}' '+'
|
||||
|
||||
|
@ -590,7 +590,7 @@ f_linearize_concat(const struct f_inst * const inst[], uint count, uint results)
|
||||
for (uint i=0; i<count; i++)
|
||||
out->len = linearize(out, inst[i], out->len);
|
||||
|
||||
out->results = results;
|
||||
out->results = results;
|
||||
|
||||
#ifdef LOCAL_DEBUG
|
||||
f_dump_line(out, 0);
|
||||
|
@ -113,13 +113,13 @@ mrt_buffer_flush(buffer *b)
|
||||
}
|
||||
|
||||
#define MRT_DEFINE_TYPE(S, T) \
|
||||
UNUSED static inline void mrt_put_##S##_(buffer *b, T x) \
|
||||
static inline void UNUSED mrt_put_##S##_(buffer *b, T x) \
|
||||
{ \
|
||||
put_##S(b->pos, x); \
|
||||
b->pos += sizeof(T); \
|
||||
} \
|
||||
\
|
||||
UNUSED static inline void mrt_put_##S(buffer *b, T x) \
|
||||
static inline void UNUSED mrt_put_##S(buffer *b, T x) \
|
||||
{ \
|
||||
mrt_buffer_need(b, sizeof(T)); \
|
||||
put_##S(b->pos, x); \
|
||||
|
@ -209,7 +209,7 @@ struct ks_msg
|
||||
memcpy(p, body, (l > sizeof(*p) ? sizeof(*p) : l));\
|
||||
body += l;}
|
||||
|
||||
static inline void
|
||||
static inline void UNUSED
|
||||
sockaddr_fill_dl(struct sockaddr_dl *sa, struct iface *ifa)
|
||||
{
|
||||
uint len = OFFSETOF(struct sockaddr_dl, sdl_data);
|
||||
|
@ -14,3 +14,6 @@ CONFIG_DONTROUTE_UNICAST Use MSG_DONTROUTE flag for unicast packets (def for Fre
|
||||
CONFIG_USE_HDRINCL Use IP_HDRINCL instead of control messages for source address on raw IP sockets.
|
||||
|
||||
CONFIG_RESTRICTED_PRIVILEGES Implements restricted privileges using drop_uid()
|
||||
|
||||
CONFIG_MADV_DONTNEED_TO_FREE To free pages, use MADV_DONTNEED instead of MADV_FREE (linux)
|
||||
CONFIG_DISABLE_THP Disable transparent huge pages (linux)
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define CONFIG_INCLUDE_SYSPRIV_H "sysdep/linux/syspriv.h"
|
||||
|
||||
#define CONFIG_MADV_DONTNEED_TO_FREE
|
||||
#define CONFIG_DISABLE_THP
|
||||
|
||||
#ifndef AF_MPLS
|
||||
#define AF_MPLS 28
|
||||
|
@ -20,6 +20,10 @@
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISABLE_THP
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
long page_size = 0;
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
@ -293,6 +297,12 @@ 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
|
||||
/* Check what page size the system supports */
|
||||
if (!(page_size = sysconf(_SC_PAGESIZE)))
|
||||
|
Loading…
Reference in New Issue
Block a user