Date: Fri, 11 Jan 2019 11:21:04 +0000 From: bugzilla-noreply@freebsd.org To: emulation@FreeBSD.org Subject: [Bug 230160] linuxulator doesn't implement madvise(MADV_DONTNEED) and any MADV_ flags with values >= 8 correctly Message-ID: <bug-230160-4077-NngvhuSgNn@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-230160-4077@https.bugs.freebsd.org/bugzilla/> References: <bug-230160-4077@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230160 --- Comment #6 from David Chisnall <theraven@FreeBSD.org> --- (In reply to Bill Sorenson from comment #5) `MADV_FREE` and Linux's `MADV_DONTNEED` have different use cases. For C, w= here malloc is called a lot more often than calloc, `MADV_FREE` provides much be= tter semantics. For higher-level languages or for higher-security applications where we need to guarantee zero initialisation, `MADV_FREE` is useless beca= use we have to `bzero` on either allocation or deallocation. As I said, at $WORK, we have a number of use cases where Linux's behaviour gives significantly better performance (less cache churn from redundant zeroing). We have to fall back to the zeroing behaviour when using anonymo= us shared memory though and that's a big perf hit for us. A `MADV_ZERO` would= be a big win. Note, however, that `MADV_FREE` is currently broken in the Linuxulator, bec= ause the constant has a different value in FreeBSD and Linux and the Linuxulator just passes the flags through unmodified. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230160-4077-NngvhuSgNn>