Re: [PATCH v3 4/5] cramfs: add mmap support

2017-08-31 Thread Nicolas Pitre
On Thu, 31 Aug 2017, Christoph Hellwig wrote: > The whole VMA games here look entirely bogus you can't just drop > and reacquire mmap_sem for example. > And splitting vmas looks just > as promblematic. I didn't just decide to do that on a whim. I spent quite some time looking at page fault code

Re: [PATCH v3 4/5] cramfs: add mmap support

2017-08-31 Thread Christoph Hellwig
The whole VMA games here look entirely bogus you can't just drop and reacquire mmap_sem for example. And splitting vmas looks just as promblematic. As a minimum you really must see the linux-mm list can get some feedback there. On Wed, Aug 30, 2017 at 11:09:31PM -0400, Nicolas Pitre wrote: > Wh

[PATCH v3 4/5] cramfs: add mmap support

2017-08-30 Thread Nicolas Pitre
When cramfs_physmem is used then we have the opportunity to map files directly from ROM, directly into user space, saving on RAM usage. This gives us Execute-In-Place (XIP) support. For a file to be mmap()-able, the map area has to correspond to a range of uncompressed and contiguous blocks, and i