Dazo-org/zerovm — Issue #2: MMAP for result data or other solution
Author: camuel
Created: 2011-11-25 19:50:42+00:00
State: open
Labels: CRITICAL, RESEARCH

We currently have following technical issues with using mmap for resultant data:

1. We don't know apriori how long result data will be and so cannot create result file of correct size and mmap it before running ZeroVM.

2. Creating a file with zeros (with lseek not physically writing zeros of course) and mmaping it, creates another problem that it probably will be read on any write meaning when the page is accessed with a write to first word, the whole page will be read first from the file.

3. Another problem with lseek is that if write will be not sequential then linux really will populate the file with zeros up to this point. However it is not specific to mmap and seems to be common problem with files that could not be efficiently populated backwards.

So we pretty much stuck with using MMAP for resultant data and need some good research before the work can be started and may be there will be a need to switch to ordinary file write.

All claims above are unverified strait from my head.