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

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sun Mar 03 2002 - 17:01:30 EST


> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 07 2002 - 21:00:28 EST