linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: John Stultz <john.stultz@linaro.org>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Saravana Kannan <saravanak@google.com>,
	Todd Kjos <tkjos@google.com>, Stephen Boyd <sboyd@kernel.org>
Subject: Re: On trace_*_rcuidle functions in modules
Date: Tue, 14 Apr 2020 19:57:49 -0700	[thread overview]
Message-ID: <20200415025748.GV17661@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <CALAqxLV4rM74wuzuZ+BkUi+keccxkAxv30N4vrFO7CVQ5vnT1A@mail.gmail.com>

On Tue, Apr 14, 2020 at 07:20:01PM -0700, John Stultz wrote:
> Hey folks,
>   So recently I was looking at converting some drivers to be loadable
> modules instead of built-in only, and one of my patches just landed in
> -next and started getting build error reports.
> 
> It ends up, recently in the merge window, the driver I was converting
> to module switched a trace_*() function to trace_*_rcuidle() to fix a
> bug.  Now when building as a module, if tracing is configured on, it
> can't seem to find the trace_*_rcuidle() symbol.
> 
> This is because, as you are aware, we don't declare trace_*_rcuidle
> functions in modules - and haven't for quite some time:
>   https://lore.kernel.org/lkml/20120905062306.GA14756@leaf/
> 
> I wanted to better understand the background rationale for that patch,
> to understand if not exporting the rcu_idle_exit and rcu_idle_enter,
> calls was because they weren't used or if it was a more intentional
> decision to avoid allowing modules to use them.
> 
> Would it be reasonable to revisit that patch? Or is there some
> recommended alternative solution?

I will defer to Steven and Josh on the rationale.  (Cowardly of me,
I know!)

What I do is to maintain a wrapper for tracepoints within a built-in
portion of RCU, export the wrapper, and invoke the wrapper from the
rcutorture module.  Maybe you can do something similar?

But why would a module be invoked from the idle loop?  Is the module
supplying an idle driver or some such?

							Thanx, Paul

  reply	other threads:[~2020-04-15  2:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15  2:20 On trace_*_rcuidle functions in modules John Stultz
2020-04-15  2:57 ` Paul E. McKenney [this message]
2020-04-15  3:47   ` John Stultz
2020-04-15 13:12     ` Paul E. McKenney
2020-04-15 12:53 ` Steven Rostedt
2020-04-15 19:56   ` John Stultz
2020-04-15 20:14     ` Steven Rostedt
2020-04-15 20:17       ` John Stultz
2020-04-15 20:41         ` Steven Rostedt
2020-04-15 21:02           ` John Stultz
2020-04-15 21:49             ` Steven Rostedt
2020-04-15 22:04               ` Paul E. McKenney
2020-04-15 22:42                 ` Peter Zijlstra
2020-04-15 22:53                   ` Steven Rostedt
2020-04-15 22:53                   ` Paul E. McKenney
2020-04-15 22:51                 ` Steven Rostedt
2020-04-15 22:54                   ` Paul E. McKenney
2020-04-16  0:06                   ` John Stultz
2020-04-16  0:48                     ` Steven Rostedt
2020-04-16  1:02                       ` Bjorn Andersson
2020-04-16  1:24                         ` Steven Rostedt
2020-04-16  2:17                       ` John Stultz
2020-04-15 22:07               ` John Stultz
2020-04-15 22:40       ` Peter Zijlstra

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=20200415025748.GV17661@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=saravanak@google.com \
    --cc=sboyd@kernel.org \
    --cc=tkjos@google.com \
    /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).