mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Lina Iyer <ilina@codeaurora.org>,
	Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH 4/5] cpuidle: governor: Export the needed symbols
Date: Mon, 9 Nov 2020 13:34:16 +0100	[thread overview]
Message-ID: <20201109123416.GO2594@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJZ5v0i-1eZ+j_6C83qs1-q1FSw0Yx96yQyy0KQBvDxX6KF=3w@mail.gmail.com>

On Thu, Nov 05, 2020 at 03:04:10PM +0100, Rafael J. Wysocki wrote:
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index 2d95dc3f4644..ceba61bb364d 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -3838,6 +3838,7 @@ unsigned long nr_iowait_cpu(int cpu)
> >  {
> >         return atomic_read(&cpu_rq(cpu)->nr_iowait);
> >  }
> > +EXPORT_SYMBOL_GPL(nr_iowait_cpu);
> 
> Hmm.  See below.

Did anyone read the comment above this function? It's garbage, it should
be deleted, not made available to a wider audience.

> >  /*
> >   * IO-wait accounting, and how its mostly bollocks (on SMP).
> > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> > index f0199a4ba1ad..537716124d46 100644
> > --- a/kernel/time/tick-sched.c
> > +++ b/kernel/time/tick-sched.c
> > @@ -500,12 +500,19 @@ static int __init setup_tick_nohz(char *str)
> >
> >  __setup("nohz=", setup_tick_nohz);
> >
> > +bool tick_nohz_is_enabled(void)
> > +{
> > +       return tick_nohz_enabled;
> > +}
> > +EXPORT_SYMBOL_GPL(tick_nohz_is_enabled);
> > +
> >  bool tick_nohz_tick_stopped(void)
> >  {
> >         struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
> >
> >         return ts->tick_stopped;
> >  }
> > +EXPORT_SYMBOL_GPL(tick_nohz_tick_stopped);
> >
> >  bool tick_nohz_tick_stopped_cpu(int cpu)
> >  {
> > @@ -1066,6 +1073,7 @@ bool tick_nohz_idle_got_tick(void)
> >         }
> >         return false;
> >  }
> > +EXPORT_SYMBOL_GPL(tick_nohz_idle_got_tick);
> >
> >  /**
> >   * tick_nohz_get_next_hrtimer - return the next expiration time for the hrtimer
> > @@ -1117,6 +1125,7 @@ ktime_t tick_nohz_get_sleep_length(ktime_t *delta_next)
> >
> >         return ktime_sub(next_event, now);
> >  }
> > +EXPORT_SYMBOL_GPL(tick_nohz_get_sleep_length);
> 
> Peter please correct me if I'm mistaken, but IMV the above are core
> kernel internals and they should not be accessible to random modular
> stuff.

Yeah,... making this available seems unfortunate. Also, I don't really
see the point, why do we want the idle governors as modules? On the
cpufreq side we're trying to move away from modules and multiple
governors.

  reply	other threads:[~2020-11-09 12:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 14:44 [PATCH 1/5] cpuidle: Remove pointless stub Daniel Lezcano
2020-10-15 14:44 ` [PATCH 2/5] cpuidle: governor: Encapsulate the cpuidle on/off switch Daniel Lezcano
2020-10-15 14:44 ` [PATCH 3/5] cpuidle: governor: Make possible to unregister a governor Daniel Lezcano
2020-10-15 14:44 ` [PATCH 4/5] cpuidle: governor: Export the needed symbols Daniel Lezcano
2020-11-05 14:04   ` Rafael J. Wysocki
2020-11-09 12:34     ` Peter Zijlstra [this message]
2020-10-15 14:44 ` [PATCH 5/5] cpuidle: governor: Convert governors to modules Daniel Lezcano
2020-10-16 15:24 ` [PATCH 1/5] cpuidle: Remove pointless stub Rafael J. Wysocki
2020-10-16 20:31   ` Daniel Lezcano
2020-11-05 14:14     ` Rafael J. Wysocki
2020-11-05 15:31       ` Daniel Lezcano

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=20201109123416.GO2594@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=frederic@kernel.org \
    --cc=ilina@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /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

all inboxes | Powered by JetHome®