Re: vm philosophising

Rob Landley
2002-01-20T02:03:00Z

On Friday 18 January 2002 11:42 pm, David Luyer wrote:

> And while precommit may be something people ask for, I'd have to say
> many
> of them would, having experienced the difference on identical hardware,
> then realise what a bad idea it was and go back to the current mode.
> That is, it sounds like a big waste of time to implement the
> 'traditional'
> behaviour which Linux is already so much better than.
>
> David.

Precommit basically just asks the application to die when it first allocates
memory if it's even possible for it to die in the most pathlogical usage case
of that memory.

I.E. "die up front" instead of "die while running". (There's no possible way
this can improve performance. If you want to never swap, just don't mount a
swap partition.) You don't even have to change the VM's behavior, it can
still copy on write and such. You just add a test to cause allocations to
fail unnecessarily at times.

Throwing in a little extra code on mmaps and allocations to kill a process
wouldn't be too hard. It would be stupid outside of something like a
financial transaction system (and probably even in there), but it technically
shouldn't be all that hard to do.

Unless I missed something...?

Rob