sbrk(2) broken

Igor Mozolevsky igor at hybrid-lab.co.uk
Fri Jan 4 05:03:04 PST 2008


On 04/01/2008, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:

> SIGDANGER is not what we need.
>
> What we need is an intelligent mechanism to tell applications what
> the overall situation is, so that jemalloc and aware applications can
> tune their usage pattern to the availability of physical and virtual
> memory.
>
> Instead of the binary "SIGDANGER" indication we need a more gradual
> state, at the very least three stats:  "plenty", "getting a bit
> tight" and "crunchtime".

This makes memory management in the userland hideously and
unnecessarily complicated. It's simpler to have SIGDANGER (meaning,
free all you can) -> SIGTERM (terminate gracefully) -> SIGKILL (too
late, I'm killing you anyway); and maybe a MIB in sysctl like
...vm.overcommit_action  ='soft' being SIGDANGER->SIGTERM->SIGKILL and
= 'hard' being SIGKILL, so the sysadmin at least has a choice

Igor


More information about the freebsd-current mailing list