[m-rev.] for review: Enable munmap support in Boehm GC by default.
Peter Wang
novalazy at gmail.com
Wed Jul 22 22:18:12 AEST 2020
On Wed, 22 Jul 2020 21:54:49 +1000 Julien Fischer <jfischer at opturion.com> wrote:
>
> 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?
A small amount of testing on Windows, no benchmarks (timings in a VM
seemed too inconsistent to draw any conclusions). I might try on a
native installation later.
I got someone else to test on a Mac; the compiler and Prince both work
with munmap support enabled.
Bootcheck passed on FreeBSD with munmap enabled.
Peter
More information about the reviews
mailing list