From: "Zach O'Keefe" <zokeefe@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Gautam Menghani <gautammenghani201@gmail.com>,
akpm@linux-foundation.org, mhiramat@kernel.org,
shy828301@gmail.com, vbabka@suse.cz, david@redhat.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/khugepaged: add tracepoint to collapse_file()
Date: Mon, 24 Oct 2022 09:44:16 -0700 [thread overview]
Message-ID: <CAAa6QmSKtj6T2dW1tkg5_HVj2+rXj5inOLdEzr0MkJzQxxcPXQ@mail.gmail.com> (raw)
In-Reply-To: <20221024111621.3ba17e2c@gandalf.local.home>
Thanks for your mail, Gautam.
> I try to keep dereferences out of the calling path as much as possible
> (adds to I$ at the call site).
This was probably due to the way I handled
trace_mm_khugepaged_scan_file(). Perhaps that can be cleaned up at the
same time as this patch, for consistency.
Also, no qualms about adding this tracepoint; there are a few scan
result codes that overlap between hpage_collapse_scan_file() and those
possibly returned in collapse_file() such that, if we only have the
one tracepoint in hpage_collapse_scan_file(), it could be ambiguous
what callsite the error path stemmed from. Luckily this hasn't been an
issue thus far.
Lastly, a few other items we might care about capturing:
- is_shmem (perhaps the filename is enough to know this - but I know
at least once during development I was caught off-guard b/c a mount I
thought to be file-backed turned out to be tmpfs (and something I
didn't think to question until I had wasted some time on other
paths)).
- index
Best,
Zach
> Could you just pass in file, and then have:
>
> __string(filename, file->f_path.dentry->d_iname)
>
> [..]
>
> __assign_string(filename, file->f_path.dentry->d_iname);
>
>
> If you are paranoid, you can have the above also be:
>
> file ? file->f_path.dentry ? file->f_path.dentry->d_iname : "(null)" : "(null)")
>
>
> -- Steve
>
>
> > + nr, result);
> > return result;
next prev parent reply other threads:[~2022-10-24 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 15:09 Gautam Menghani
2022-10-24 15:16 ` Steven Rostedt
2022-10-24 16:44 ` Zach O'Keefe [this message]
2022-10-24 17:38 ` Gautam Menghani
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=CAAa6QmSKtj6T2dW1tkg5_HVj2+rXj5inOLdEzr0MkJzQxxcPXQ@mail.gmail.com \
--to=zokeefe@google.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=gautammenghani201@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=shy828301@gmail.com \
--cc=vbabka@suse.cz \
/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