On Tue, Apr 03, 2007 at 02:46:09PM -0700, Ulrich Drepper wrote: > Eric Dumazet wrote: > > A page fault is not that expensive. But clearing N*PAGE_SIZE bytes is, > > because it potentially evicts a large part of CPU cache. > > *A* page fault is not that expensive. The problem is that you get a > page fault for every single page. For 200k allocated you get 50 page > faults. It quickly adds up.
If you know in advance you need them it might be possible to batch that. e.g. MADV_WILLNEED could be extended to work on anonymous memory and establish the mappings in the syscall. Would that be useful? -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/