On 2/19/25 14:14, Rob Landley wrote:
On 2/19/25 11:24, Bernhard Voelker wrote:
On 2/10/25 2:34 PM, Matteo Croce wrote:
mu is a new tool which shows the amount of data that a set of files
are keeping into the cache.
mu uses the new cachestat() syscall introduced with Linux 6.5.

The GNU coreutils aim to be a platform independent implementation of a certain
set of tools, most of them specified by POSIX.

Busybox has a "readahead" command under miscutils, which preloads a file into disk cache. This seems like an option to readahead. (Maybe -s to show size?)
...
I still think readahead -s makes sense here. You can tell Denys I said so if you like. :)

I just checked and toybox also has readahead (well I never use it, I added it in 2013 because somebody asked), but cachestat() was only added in 2023 (linux commit cf264e1329fb) and my devuan install hasn't got "man 2 cachestat" yet, nor is it in https://man7.org/linux/man-pages/dir_section_2.html , which still says 6.10 not the new 6.11 from last week ala https://www.spinics.net/lists/linux-man/msg29002.html but I'm not spotting a mention of this syscall in that list's archives.

It might make sense to poke the man-pages project to to add a page for the syscall before trying to get userspace to use it.

Rob

P.S. Also, "grep -r cachestat /usr/include" came up blank on my devuan deadmau5 laptop, which has glibc 2.36, although musl commit dd690c490951 added it there (the syscall number, no libc wrapper yet), so I do have a way to test it. But it still seems a bit unripe without a libc wrapper to let you call it as a function...

Reply via email to