Re: Ok, making ready for pre-2.4 and code-freeze..

Ralf Baechle (ralf@uni-koblenz.de)
Wed, 22 Dec 1999 01:25:26 +0100


On Wed, Dec 22, 1999 at 09:58:07AM +1300, Chris Wedgwood wrote:

> So things like:
>
> /* mmap a file, hopefully this will use a small number of
> large pages */
>
> ptr = mmap(NULL,262144ul,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);
>
>
> /* protect middle part of file -- will probably mean the
> pages get remapped into small pages too */
>
> err = mprotect(ptr + 65536,pgsize,PROT_NONE);
>
> will make the mm code to do clever tricks? Surely if this operation
> is expensive (perhaps it need not be?) dynamic loaders and such will
> pay the price?

The whole algorithem has already been shown to be effective in IRIX,
see their USENIX 1998 paper. Especially large memory apps that result
in TLB thrashing may gain tremendously, the paper has some benchmark.
HP did a similar thing for HPUX and did present it the year before,
also with very positive results.

Ralf

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