All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: "Yakov Lerner" <iler.ml@gmail.com>
Cc: "Kernel Linux" <linux-kernel@vger.kernel.org>
Subject: Re: calculate actual state of caches wrt set of files/dirs, without modifying caches ?
Date: Tue, 13 May 2008 13:07:08 +0200	[thread overview]
Message-ID: <877idysbs3.fsf@basil.nowhere.org> (raw)
In-Reply-To: <f36b08ee0805122330p6b479bc9s1db48c8c466d0ae9@mail.gmail.com> (Yakov Lerner's message of "Tue, 13 May 2008 08:30:48 +0200")

"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

      reply	other threads:[~2008-05-13 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877idysbs3.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=iler.ml@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.