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:17:59 -0500 [thread overview]
Message-ID: <20230112171759.70132384@gandalf.local.home> (raw)
In-Reply-To: <Y8BvKZFI9RIoS4C/@casper.infradead.org>
On Thu, 12 Jan 2023 20:35:53 +0000
Matthew Wilcox <willy@infradead.org> wrote:
> On Thu, Jan 12, 2023 at 01:21:53PM -0500, Steven Rostedt wrote:
> > What I would like to discuss, is if there could be a way to add some sort
> > of trace events that can tell an application exactly what pages in a file
> > are being read from disk, where there is no such races. Then an application
> > would simply have to read this information and store it, and then it can
> > use this information later to call readahead() on these locations of the
> > file so that they are available when needed.
>
> trace_mm_filemap_add_to_page_cache()?
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?
(from a 5.10 modified kernel)
<...>-177 [001] 13.166966: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a0 pfn=2586272 ofs=1204224
<...>-177 [001] 13.166968: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a1 pfn=2586273 ofs=1208320
<...>-177 [001] 13.166968: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a2 pfn=2586274 ofs=1212416
<...>-177 [001] 13.166969: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a3 pfn=2586275 ofs=1216512
<...>-177 [001] 13.166970: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a4 pfn=2586276 ofs=1220608
<...>-177 [001] 13.166971: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a5 pfn=2586277 ofs=1224704
<...>-177 [001] 13.166972: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a6 pfn=2586278 ofs=1228800
<...>-177 [001] 13.166972: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a7 pfn=2586279 ofs=1232896
<...>-177 [001] 13.166973: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a8 pfn=2586280 ofs=1236992
<...>-177 [001] 13.166974: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776a9 pfn=2586281 ofs=1241088
<...>-177 [001] 13.166979: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776aa pfn=2586282 ofs=1245184
<...>-177 [001] 13.166980: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776ab pfn=2586283 ofs=1249280
<...>-177 [001] 13.166981: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776ac pfn=2586284 ofs=1253376
<...>-177 [001] 13.166981: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776ad pfn=2586285 ofs=1257472
<...>-177 [001] 13.166982: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776ae pfn=2586286 ofs=1261568
<...>-177 [001] 13.166983: mm_filemap_add_to_page_cache: dev 259:5 ino 9b11 page=0x2776af pfn=2586287 ofs=1265664
The dev 259:5 is the root partition.
Doing the following:
$ printf "%d\n" 0x9b11
39697
$ sudo find / -xdev -inum 39697
/lib64/libc.so.6
I guess that's what I need to do. Thanks!
I'll try it out. But I'd still like to have an invite as I have lots of
other fun stuff to talk to you all about (mm, fs, and BPF) ;-)
-- Steve
next prev parent reply other threads:[~2023-01-12 22:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 18:21 Steven Rostedt
2023-01-12 20:35 ` Matthew Wilcox
2023-01-12 22:17 ` Steven Rostedt [this message]
2023-01-12 22:24 ` Matthew Wilcox
2023-01-12 22:30 ` Steven Rostedt
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=20230112171759.70132384@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