This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: dl-load.c suggestion
- To: roland@frob.com
- Subject: Re: dl-load.c suggestion
- From: "David S. Miller" <davem@dm.cobaltmicro.com>
- Date: Sat, 23 May 1998 05:49:34 -0700
- CC: rth@cygnus.com, drepper@cygnus.com, libc-hacker@gnu.org
- References: <199805230614.CAA24354@baalperazim.frob.com>
Date: Sat, 23 May 1998 02:14:19 -0400
From: Roland McGrath <roland@frob.com>
Yes, the tlb flush is the same; I did not say differently. It is
more efficient in the operating system to do mprotect than mmap,
because it doesn't have to consult the file table or the filesystem
layer again, or tweak the memory backing object data structures,
just the page tables.
This is not true for Linux on the Intel. Believe it or not, mmap() is
the cheapest of all operations. mprotect()/munmap() both have the
same bad cost on Intel Linux, for both calls the process (and the
entire system in fact) loses it's entire resident set in the TLB.
Later,
David S. Miller
davem@dm.cobaltmicro.com