0a2a0873 | 22-Jun-2015 |
David van Moolenbroek <david@minix3.org> |
libfsdriver: clear VM cache only if used
As part of its built-in mmap emulation support for "none" file system services, libfsdriver clears the VM cache upon exit. However, for trivial file systems
libfsdriver: clear VM cache only if used
As part of its built-in mmap emulation support for "none" file system services, libfsdriver clears the VM cache upon exit. However, for trivial file systems which do not even support reading from files, the the VM cache need to be cleared either. With this patch, the VM cache is cleared only when modified, so that such trivial file systems need not be given CLEARCACHE permission.
Change-Id: I518c092443455302b9b9728f10a3f894d2c8036b
show more ...
|
3f30eb69 | 21-Jun-2015 |
David van Moolenbroek <david@minix3.org> |
libfsdriver: default to noop for putnode
While putnode requests should always succeed, very simple file system services may not care about reference counts and thus about putnode requests at all. F
libfsdriver: default to noop for putnode
While putnode requests should always succeed, very simple file system services may not care about reference counts and thus about putnode requests at all. For this reason, we now default to an OK response if no fdr_putnode implementation is given.
Change-Id: I01f6421abf4546a1f69d8c21900a92d6acc45745
show more ...
|
e321f655 | 15-Nov-2014 |
David van Moolenbroek <david@minix3.org> |
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 impleme
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
show more ...
|