From: "Stefan Roesch" <shr@devkernel.io>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: kernel-team@fb.com, linux-mm@kvack.org,
linux-trace-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH v1] mm: add tracepoints to ksm
Date: Fri, 10 Mar 2023 14:34:20 -0800 [thread overview]
Message-ID: <01a4814a-d8e3-4da2-8346-f4dc302e16f2@app.fastmail.com> (raw)
In-Reply-To: <20230310150218.31510a60@gandalf.local.home>
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]
I'll follow that approach.
On Fri, Mar 10, 2023, at 12:02 PM, Steven Rostedt wrote:
> On Fri, 10 Mar 2023 11:22:54 -0800
> Stefan Roesch <shr@devkernel.io> wrote:
>
> > >> + trace_ksm_remove_rmap_item(stable_node->kpfn, rmap_item, rmap_item->mm);
> > >
> > > Instead of dereferencing the stable_node here, where the work could
> > > possibly happen outside the trace event and in the hot path, could you pass
> > > in the stable_node instead, and then in the TP_fast_assign() do:
> > >
> > > __entry->pfn = stable_node->kpfn;
> > >
> > >
> >
> > To do this, the structure would need to be exposed. Currently the
> > structure is defined in ksm.c. This is an internal structure that we
> > most likely don't want to expose. We can get by not printing the pfn
> > and use the rmap_item to refer back to it, but exposing it directly
> > here is more convenient for debugging.
> >
> > Any thoughts?
>
> Sounds like the include/trace/events/ksm.h should be local too.
>
> See my reply about include/trace/events/thermal.h
>
> https://lore.kernel.org/all/20230227100715.7d896836@gandalf.local.home/
>
> And their solution.
>
> https://lore.kernel.org/all/20230307133735.90772-2-daniel.lezcano@linaro.org/
>
> I suggest you do the same.
>
> -- Steve
>
[-- Attachment #2: Type: text/html, Size: 2297 bytes --]
prev parent reply other threads:[~2023-03-10 22:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 21:46 [PATCH v1] mm: add tracepoints to ksm Stefan Roesch
2023-03-09 22:27 ` Steven Rostedt
2023-03-09 22:30 ` Stefan Roesch
2023-03-10 19:22 ` Stefan Roesch
2023-03-10 20:02 ` Steven Rostedt
2023-03-10 22:34 ` Stefan Roesch [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=01a4814a-d8e3-4da2-8346-f4dc302e16f2@app.fastmail.com \
--to=shr@devkernel.io \
--cc=akpm@linux-foundation.org \
--cc=kernel-team@fb.com \
--cc=linux-mm@kvack.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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).