[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mmap/munmap semantics
Richard Guenther wrote:
> Oops, so I misread the code in drivers/char/mem.c ... well, so how can I
> get the same effect as for the private mapping? Not at the moment, I
> think? So memset should be faster than reading from /dev/zero?
Try them both. /dev/zero may be faster eventually, once kiobufs do
clever things. For the moment they should be about the same speed apart
from syscall entry cost, so zeroing a large region would be fine with
/dev/zero, and for a small region even when kiobufs are working, you
probably don't want the overhead of messing with page tables for a small
region.
enjoy,
-- Jamie
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/