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

Alan Cox
2002-03-03T21:47:10Z

> The reason for this is that for UML, those pages are backed by host memory,
> which may or may not be available when they are finally touched at some
> arbitrary place in the kernel. I hit this by tmpfs running out of room
> because my UMLs have their memory backed by tmpfs mounted on /tmp. So, I
> want to be able to dirty those pages before they are seen by any other code.

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. It knows about tmpfs too but not ramfs, ramdisk or ptrace yet

Alan