From 8f75ec4950bdb53418a2c5e71cb1fbf8d9d501a0 Mon Sep 17 00:00:00 2001 From: trasz Date: Fri, 10 Jul 2020 21:41:09 +0000 Subject: [PATCH] Don't emit warnings on MADV_HUGEPAGE; Firefox uses it a lot. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/compat/linux/linux_mmap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linux/linux_mmap.c b/sys/compat/linux/linux_mmap.c index 8391da0b8e4f..969e49e327e8 100644 --- a/sys/compat/linux/linux_mmap.c +++ b/sys/compat/linux/linux_mmap.c @@ -371,7 +371,13 @@ linux_madvise_common(struct thread *td, uintptr_t addr, size_t len, int behav) /* Ignored; on FreeBSD huge pages are always on. */ return (0); case LINUX_MADV_NOHUGEPAGE: +#if 0 + /* + * Don't warn - Firefox uses it a lot, and in real Linux it's + * an optional feature. + */ linux_msg(curthread, "unsupported madvise MADV_NOHUGEPAGE"); +#endif return (EINVAL); case LINUX_MADV_DONTDUMP: return (kern_madvise(td, addr, len, MADV_NOCORE));