x/sys/unix: new cachestat syscall in Linux 6.5 #61917
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FeatureRequest
Issues asking for a new feature that does not need a proposal.
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
A new system call called "cachestat" will be introduced in Linux 6.5 (currently RC5), which enables user-space applications to retrieve detailed page cache statistics for a specific file. This syscall provides valuable insights for making informed decisions about file operations and resource management.
While Linux already has the "mincore" syscall (which we have already in x/sys/unix and runtime) for checking page residency in memory, "cachestat" offers more extensive page cache statistics, aiming to enhance scalability. The syscall's output includes information about cached pages, dirty pages, pages marked for writeback, evicted pages, and recently evicted pages.
This new syscall seems to be quite a lot faster than mincore in some benchmarks shared here.
Some possible use cases for it:
The text was updated successfully, but these errors were encountered: