lkml.org 
[lkml]   [2008]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: calculate actual state of caches wrt set of files/dirs, without modifying caches ?
From
Date
"Yakov Lerner" <iler.ml@gmail.com> writes:

> Is it possible to calculate the following thing from userspace:
> Some benchmarking program has list of filenames and dirnames.
> Can it calculate how many of inodes and data blocks of those items are *cached*
> vs how many are not, without modifying existing
> status of inode caches & buffer caches ?

For inodes/dentries it is not possible AFAIK (short of taking a kernel
crash dump and walking the data structures), but for file data you can mmap
the file without accessing it and then check with mincore() for each page.

-Andi


\
 
 \ /
  Last update: 2008-05-13 13:09    [W:0.026 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site