Re: [PATCH] make MADV_FREE lazily free memory

From: Anton Blanchard
Date: Mon Apr 16 2007 - 12:14:23 EST



Hi,

> Making the pte clean also needs to clear the hardware writable
> bit on architectures where we do pte dirtying in software.
>
> If we don't, we would have corruption problems all over the VM,
> for example in the code around pte_clean_one :)
>
> >But as Linus recently said, even hardware handled faults still
> >take expensive microarchitectural traps.
>
> Nowhere near as expensive as a full page fault, though...

Unfortunately it will be expensive on architectures that have software
referenced and changed. It would be great if we could just leave them
dirty in the pagetables and transition between a clean and dirty state
via madvise calls, but thats just wishful thinking on my part :)

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