[External] : Re: Project Loom technical questions
Thomas Stüfe
thomas.stuefe at gmail.com
Mon Aug 2 16:18:58 UTC 2021
Hi Erik,
Sorry for chiming in. I got curious and did an experiment where I don't
pre-commit guards, instead replacing later mprotect'ing them with
committing/uncommitting. The VM handled overflows just fine. Footprint was
exactly the same as before.
So I wonder if it really matters if you pre-commit guards or not. Guards
don't seem to cost RSS either way. They cost one mapping each (which is
also a limited resource), but that's true for both variants. Am I missing
something? Apart from just saving those early mmap calls.
Thanks, Thomas
p.s. I think pre-committing is no strong guarantee either since it depends
on the kernel overcommit settings. Besides, mprotect may fail at any time
later despite pre-committing due to the number of mappings. Which is why,
curiously, protecting a page can give you an ENOMEM.
On Sun, Aug 1, 2021 at 3:00 PM Erik Osterlund <erik.osterlund at oracle.com>
wrote:
> I see the general point, and agree, but to be fair, I don’t think guard
> pages need to be committed up-front.
>
> /Erik
>
>
>
More information about the loom-dev
mailing list