diff mbox series

[08/14] sched/core: Export runqueues per-cpu array

Message ID 20200507181012.29791-9-qperret@google.com (mailing list archive)
State RFC, archived
Headers show
Series Modularize schedutil | expand

Commit Message

Quentin Perret May 7, 2020, 6:10 p.m. UTC
It will be needed by schedutil once modularized, export it.

Signed-off-by: Quentin Perret <qperret@google.com>
---
This is only needed for cpu_rq() -> cpu_bw_dl() in schedutil, so there is
probably an alternative if exporting this isn't desirable.
---
 kernel/sched/core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Peter Zijlstra May 8, 2020, 8:07 a.m. UTC | #1
On Thu, May 07, 2020 at 07:10:06PM +0100, Quentin Perret wrote:
> It will be needed by schedutil once modularized, export it.
> 
> Signed-off-by: Quentin Perret <qperret@google.com>
> ---
> This is only needed for cpu_rq() -> cpu_bw_dl() in schedutil, so there is
> probably an alternative if exporting this isn't desirable.
> ---
>  kernel/sched/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index dbaf3f63df22..537eb45b4274 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -36,6 +36,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(pelt_se_tp);
>  EXPORT_TRACEPOINT_SYMBOL_GPL(sched_overutilized_tp);
>  
>  DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
> +EXPORT_SYMBOL_GPL(runqueues);

NAK, never going to happen.
Quentin Perret May 8, 2020, 10:04 a.m. UTC | #2
On Friday 08 May 2020 at 10:07:59 (+0200), Peter Zijlstra wrote:
> On Thu, May 07, 2020 at 07:10:06PM +0100, Quentin Perret wrote:
> > It will be needed by schedutil once modularized, export it.
> > 
> > Signed-off-by: Quentin Perret <qperret@google.com>
> > ---
> > This is only needed for cpu_rq() -> cpu_bw_dl() in schedutil, so there is
> > probably an alternative if exporting this isn't desirable.
> > ---
> >  kernel/sched/core.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index dbaf3f63df22..537eb45b4274 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -36,6 +36,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(pelt_se_tp);
> >  EXPORT_TRACEPOINT_SYMBOL_GPL(sched_overutilized_tp);
> >  
> >  DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
> > +EXPORT_SYMBOL_GPL(runqueues);
> 
> NAK, never going to happen.

Well, I should have seen that one coming :-)

As mentioned in the commit message, we might be able to work around.
I'll cook something for v2.

Thanks,
Quentin
diff mbox series

Patch

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index dbaf3f63df22..537eb45b4274 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -36,6 +36,7 @@  EXPORT_TRACEPOINT_SYMBOL_GPL(pelt_se_tp);
 EXPORT_TRACEPOINT_SYMBOL_GPL(sched_overutilized_tp);
 
 DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
+EXPORT_SYMBOL_GPL(runqueues);
 
 #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_JUMP_LABEL)
 /*