Re: [RFC] Arch option to touch newly allocated pages

Jeff Dike
2002-03-03T23:24:53Z

alan@lxorguk.ukuu.org.uk said:
> No - you think you want to dirty the pages - you want to account the
> address space. What you want to do is run 2.4.18ac3 and do
> echo "2" > /proc/sys/vm/overcommit_memory
> which on a good day will give you overcommit protection. Your map
> requests will fail without the pages being dirtied and the extra swap
> that would cause.

That doesn't sound right to me.

I don't have individual little map requests going on here. I have a single
large map happening at boot time which creates the UML "physical" memory
area.

So, say I have a 128M UML which is only ever going to use 32M of that. If
there isn't 128M of address space, but there is 32M, this UML will never
get off the ground, even though it really deserved to.

About the swap allocation, I'd bet essentially all the time when a page
is allocated, its dirtiness is imminent anyway. So, I'm not adding anything
to swap. It'll be there a usec later anyway. What I want is for the dirtying
to happen in a controlled place where something sane can be done if the page
isn't really there.

Jeff