nofscache is a loadable kernel moduel used to to eliminating page caching effects for user applications.

Requirements

Installation

git clone https://github.com/ljishen/nofscache.git
cd nofscache
make install

If you keep seeing processes under

[INFO] Checking transition state for module no_fscache (update every 2s)...

[INFO] 2 tasks are not in patched state:
USER       PID   TID CMD
root      1040  1131 /usr/bin/lxcfs /var/lib/lxcfs/
root      1040  1133 /usr/bin/lxcfs /var/lib/lxcfs/

...

You may need to manually kill these processes because they are stopping the module from finishing the transition state from unpatched to patched. See livepatch consistency model for more details.

To uninstall the kernel module, use

make uninstall

Again, you may need to kill processes to help the module finish the transition state from patched to unpatched.

Limitations

There are four basic Linux I/O models,

Four Linux IO Models

This module fully supports synchronous blocking I/O, and implicitly supports synchronous non-blocking I/O and asynchronous blocking I/O. For asynchronous non-blocking I/O, this module supports POSIX AIO as it is a user-space implementation that actually calls blocking I/O interfaces. The module may support libaio as it mainly focuses on direct I/O. We hope to support the latest I/O interface, io_uring, but this module is not ready yet. Here is a really good article explaining the differences between these I/O models.

Performance Results

Performance Results of Module no_fscache

Result Details

References

  1. Design Considerations of Eliminating External Caching Effects for MBWU Construction
    https://cross.ucsc.edu/news/blog/mbwuconstruction_122010.html

  2. Implementing a Kernel Module to Eliminating External Caching Effects
    https://cross.ucsc.edu/news/blog/mbwuconstruction_012020.html