[m-rev.] for review: Enable munmap support in Boehm GC by default.
Julien Fischer
jfischer at opturion.com
Wed Jul 22 21:54:49 AEST 2020
Hi Peter,
On Wed, 22 Jul 2020, Peter Wang wrote:
> Memory unmapping support is useful for long running programs to return
> unused memory pages back to the OS, e.g. a server process can reduce the
> amount of physical memory it occupies during idle periods.
>
> Previously the user building the Mercury system needed to enable munmap
> support at configure time. In 2008 I wrote:
>
> Allow the use of munmap() in Boehm GC, in order to return unused
> memory pages back to the OS. This has an adverse effect on run times
> so we want to be able to enable it on a per-application basis.
>
> Bdwgc upstream has more recently enabled munmap support by default on
> the master branch (albeit, not the v7.6.x branch we currently use).
>
> Some testing on my machine suggests that we can try enabling munmap
> support by default:
>
> - in asm_fast.gc grade, there was no discernable difference to the
> compiler's performance, with or without munmap support
>
> - in the hlc.gc grade, the compiler ran 1-2% faster
> WITH munmap support enabled
>
> Tested on Linux/x86-64, time to compile the 10 largest modules in the
> arena directory.
Have you tested this on platforms other than Linux/x86_64?
> configure:
> Change default value of enable_gc_mmap and enable_gc_munmap to yes.
>
> Invert sense of --enable-gc-mmap and --enable-gc-munmap options in
> the help text.
>
> NEWS:
> Announce change.
That's fine. (If further testing reveals that it's not working on some
of the other platforms then we can disable it on those by default.)
Julien.
More information about the reviews
mailing list