Re: bad lmbench numbers for mmap

V Ganesh (ganesh@vxindia.veritas.com)
Sat, 17 Apr 1999 02:17:35 +0530 (IST)


> > --------- ------------- ------ ------ ------ ------ ------- ----- -----
> > sparc-sun SunOS 5.6 480 598 4761 245 4912 21 15.6K
> >
> > and this on a P-II 450 running 2.2.5
> > --------- ------------- ------ ------ ------ ------ ------- ----- -----
> > i686-linu Linux 2.2.5 15 1 27 2 11674 1 0.7K
> >
> > so what's up with mmap ?
>
> Redo the benchmark modified to use the mmaped object each iteration. Compare.
> Ponder if one OS is delaying mmap setup

[from lat_mmap.c]
where = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
#endif
if ((int)where == -1) {
perror("mmap");
exit(1);
}
if (random) {
end = where + size;
for (p = where; p < end; p += STRIDE) {
*p = c;
}
} else {
end = where + (size / N);
for (p = where; p < end; p += PSIZE) {
*p = c;
}
}
munmap(where, size);
}

certainly seems to be touching the mmaped object.

ganesh

-
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/