Messages in this thread | | | Subject | Re: [parisc-linux] Re: Problems with kernel mmap (failing tst-mmap-eofsync in glibc on parisc) | From | James Bottomley <> | Date | 24 Aug 2003 11:54:00 -0500 |
| |
On Sun, 2003-08-24 at 00:23, David S. Miller wrote: > This is what I'm asking of you, to find cases in real life, > not some contrived example, where your optimization helps > appreciably.
Oh, OK, that's easy...it's what the glibc test was designed for.
In glibc, for each file you fopen as a mapped file, you seem to get a separate mmapping of the file (this actually looks wrong to me...it seems glibc should have only one mapping per file which all the file objects share, but anyway). That means we get one entry in one of the i_mmaps lists for each of the opens. Since these are files, the chances are they'll be read and written which will generate lots of dcache flushes. This case would kill us if we had to flush every entry in i_mmap.
Right at the moment, you have to specifically request that the file be mmapped by specifying the "m" modifier, but glibc seems to be migrating to this being the default one day...that's what I want to be ready for.
Besides the optimisation adds no overhead and compromises nothing, so its worth doing regardless.
James
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |