minix/minix
David van Moolenbroek e321f65582 libfsdriver: support mmap on FSes with no device
This patch adds (very limited) support for memory-mapping pages on
file systems that are mounted on the special "none" device and that
do not implement PEEK support by themselves.  This includes hgfs,
vbfs, and procfs.

The solution is implemented in libvtreefs, and consists of allocating
pages, filling them with content by calling the file system's READ
functionality, passing the pages to VM, and freeing them again.  A new
VM flag is used to indicate that these pages should be mapped in only
once, and thus not cached beyond their single use.  This prevents
stale data from getting mapped in without the involvement of the file
system, which would be problematic on file systems where file contents
may become outdated at any time.  No VM caching means no sharing and
poor performance, but mmap no longer fails on these file systems.

Compared to a libc-based approach, this patch retains the on-demand
nature of mmap.  Especially tail(1) is known to map in a large file
area only to use a small portion of it.

All file systems now need to be given permission for the SETCACHEPAGE
and CLEARCACHE calls to VM.

A very basic regression test is added to test74.

Change-Id: I17afc4cb97315b515cad1542521b98f293b6b559
2014-11-15 11:19:52 +00:00
..
benchmarks New sources layout 2014-07-31 16:00:30 +02:00
bin New sources layout 2014-07-31 16:00:30 +02:00
commands Turn PCI into a character driver 2014-11-10 14:43:27 +01:00
drivers libvtreefs: API changes/extensions, part 2 2014-11-12 12:13:43 +00:00
fs procfs: add /proc/service directory 2014-11-12 12:13:53 +00:00
include libfsdriver: support mmap on FSes with no device 2014-11-15 11:19:52 +00:00
kernel Turn PCI into a character driver 2014-11-10 14:43:27 +01:00
lib libfsdriver: support mmap on FSes with no device 2014-11-15 11:19:52 +00:00
llvm minix/llvm/passes/Makefile.inc: Fix 2014-08-29 12:56:57 -04:00
man Remove support for call profiling 2014-09-30 12:39:03 +00:00
net svrctl(2) update 2014-09-29 16:15:21 +00:00
sbin New sources layout 2014-07-31 16:00:30 +02:00
servers libfsdriver: support mmap on FSes with no device 2014-11-15 11:19:52 +00:00
share New sources layout 2014-07-31 16:00:30 +02:00
tests libfsdriver: support mmap on FSes with no device 2014-11-15 11:19:52 +00:00
usr.bin trace(1): document how to add an IOCTL handler 2014-11-12 12:02:29 +00:00
usr.sbin merge libminlib with libc 2014-08-28 18:49:19 +02:00
Makefile INIT died problem / build system robustness 2014-08-28 08:52:50 +02:00
Makefile.inc New sources layout 2014-07-31 16:00:30 +02:00