> On the other hand, you could write another caching backend that uses swap > instead of a blockdev that gives you temporary caching. You'd probably have to > keep all your metadata in RAM though, unless you wanted to change the way swap > files are structured. > > Actually, the reverse approach might be easier - allowing the swapper to make > use of slack space in cachefs. I like this idea.. then I can build a cluster (or "stateless" workstations) that allocate the entire disk to cachefs, and the swapper takes what it needs. I assume if the swapper could use extra space in cachefs then tmpfs would be able to use that space as well? It's starting to sound like a userland cachefs policy inteface is going to be usefull.... can this be done sanely/safely if the swapper is going to want to evict cachefs pages before reverting to the OOM killer? It just sounds like a race waiting to happen.