Drops the page cache. Nothing to restore: the node is a write-only trigger and the kernel refills the cache on demand.
()
| 56 | /// Drops the page cache. Nothing to restore: the node is a write-only |
| 57 | /// trigger and the kernel refills the cache on demand. |
| 58 | fn drop_page_cache() { |
| 59 | // drop_caches only reclaims clean objects; flush dirty buffers first. |
| 60 | nix::unistd::sync(); |
| 61 | if let Err(error) = write_root_file("/proc/sys/vm/drop_caches", "3") { |
| 62 | warn!("Failed to drop the page cache: {error}"); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /// Sets the THP default mode, returning the prior mode when it changed. |
| 67 | fn set_thp_enabled(value: &str) -> Vec<(String, String)> { |
nothing calls this directly
no test coverage detected