* calculate actual state of caches wrt set of files/dirs, without modifying caches ?
@ 2008-05-13 6:30 Yakov Lerner
2008-05-13 11:07 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Yakov Lerner @ 2008-05-13 6:30 UTC (permalink / raw)
To: Kernel Linux
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 ?
Thanks
Yakov
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: calculate actual state of caches wrt set of files/dirs, without modifying caches ?
2008-05-13 6:30 calculate actual state of caches wrt set of files/dirs, without modifying caches ? Yakov Lerner
@ 2008-05-13 11:07 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2008-05-13 11:07 UTC (permalink / raw)
To: Yakov Lerner; +Cc: Kernel Linux
"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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-13 11:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13 6:30 calculate actual state of caches wrt set of files/dirs, without modifying caches ? Yakov Lerner
2008-05-13 11:07 ` Andi Kleen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.