Re: mmap/munmap semantics

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Thu Feb 24 2000 - 10:15:30 EST


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



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:10 EST