9ns: Add LRU support to tree filesystems
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 26 Mar 2018 14:11:51 +0000 (10:11 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 30 Apr 2018 18:34:24 +0000 (14:34 -0400)
commitd38d94af7e84478e3bf9d4166200965fa0f9abd6
treea2ea70a4a0952e33aa6157543603a5d2c77b9f80
parent6d1fd6c15156c531fde3123809c77f81614073c2
9ns: Add LRU support to tree filesystems

Any non-RAMFS will want some form of access to the LRU list.  These
devices will use tree files as caches, referred to as the frontend.  The
"real" filesystem will be elsewhere: typically on a 9p server, though a
disk FS would work as well.

Since the tree_file tree is a cache, both the TFs and the page cache for
the files, devices may want to shed their caches when memory becomes
tight.

Similarly, devices may want to perform their own work on the LRU list.
For instance, the #gtfs device, which fronts #mnt, will want to
periodically prune its open FIDs to the backend 9p server.  Stay tuned.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/tree_file.h
kern/src/ns/tree_file.c