linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, bpf@vger.kernel.org,
	Joel Fernandes <joel@joelfernandes.org>,
	Brian Norris <briannorris@chromium.org>,
	Ching-lin Yu <chinglinyu@google.com>
Subject: Re: [LSF/MM/BPF TOPIC] tracing mapped pages for quicker boot performance
Date: Thu, 12 Jan 2023 17:30:36 -0500	[thread overview]
Message-ID: <20230112173036.01677fa7@gandalf.local.home> (raw)
In-Reply-To: <Y8CItRIuL3KUqUlk@casper.infradead.org>

On Thu, 12 Jan 2023 22:24:53 +0000
Matthew Wilcox <willy@infradead.org> wrote:

> > Great! How do I translate this to files? Do I just do a full scan on the
> > entire device to find which file maps to an inode? And I'm guessing that
> > the ofs is the offset into the file?  
> 
> 'ofs' is, yes.  That should have been called 'pos'.
> 
> And as you know, inodes can have multiple names in the filesystem.
> I imagine you'd want to trace open() to see which names are being
> opened; you can fstat the fd to build the ino->name lookup.

I'm not sure which file that points to the inode matters. I'm guessing that
if I have two files that are hard-linked together, and I run the readahead()
system call on one of them, it will speed up a read of the other one. Or am
I mistaken?

If I'm not mistaken, then just finding any file that is mapped to the inode
is sufficient.

The purpose of this is to speed up boot by having portions of the files
being read already in the page cache when they are needed.

-- Steve


      reply	other threads:[~2023-01-12 22:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 18:21 [LSF/MM/BPF TOPIC] tracing mapped pages for quicker boot performance Steven Rostedt
2023-01-12 20:35 ` Matthew Wilcox
2023-01-12 22:17   ` Steven Rostedt
2023-01-12 22:24     ` Matthew Wilcox
2023-01-12 22:30       ` Steven Rostedt [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=20230112173036.01677fa7@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bpf@vger.kernel.org \
    --cc=briannorris@chromium.org \
    --cc=chinglinyu@google.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).