Messages in this thread | | | Date | Mon, 25 Oct 1999 14:48:43 +0200 | From | Jamie Lokier <> | Subject | Re: fd_offset is not page aligned |
| |
Andrea Arcangeli wrote: > >it would be entirely reasonable that a non-aligned mapping would pull > >stuff into the aligned page cache, copy it to non-aligned shared pages > > You don't want to copy at all. 2.3.x enforce coherency ...
In case I'm not clear: I'm talking about read-only, MAP_DENYWRITE mappings. There's no coherency issue for these.
> ... and this simply means better performance.
Disallowing non-aligned read-only mappings means worse performance for Wine. Windows binaries want to be mapped without page alignment. Windows binaries can be quite large: I've seen Wine read in approx. 100MB of library code because it couldn't mmap, just to launch an application. It would be good to demand page these. It would be good to share the loaded images just like any other executable or shared library.
It's possible to do demand paging, in principle, using SIGSEGVs for user-space demand paging. Maybe Wine even does this now (I remember it being discussed and I haven't followed development in detail). But that's unable to demand *unmap* like a kernel mapping: only the kernel knows when those pages should be used for something else. It has other inefficiencies too.
I have considered writing some kernel code to do non-aligned, read-only, MAP_DENYWRITE mappings "on top" of existing mappings. I.e. the non-aligned mapping would be demand page just like any other, and work by _nopage simply copying the data from the page cache. This is hopefully nice and clean because it doesn't affect the normal mapping code at all. Is there any interest in such code?
-- 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/
| |