mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
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
This commit is contained in:
parent
5d704fafcb
commit
bff19560ee
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339654
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue