* [PATCH] sched: Fix build for modules using set_tsk_need_resched()
@ 2026-01-12 14:04 Gabriele Monaco
2026-01-12 14:50 ` Phil Auld
2026-01-15 21:44 ` [tip: sched/core] " tip-bot2 for Gabriele Monaco
0 siblings, 2 replies; 5+ messages in thread
From: Gabriele Monaco @ 2026-01-12 14:04 UTC (permalink / raw)
To: linux-kernel, Ingo Molnar, Peter Zijlstra; +Cc: Gabriele Monaco, Phil Auld
Commit adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
added a tracepoint to the need_resched action that can be triggered also
by set_tsk_need_resched.
This function was previously accessible from out-of-tree modules but
it's no longer available because the __trace_set_need_resched() symbol
is not exported (together with the tracepoint itself, which was exported
in a separate patch) and building such modules fails.
Export __trace_set_need_resched to modules to fix those build issues.
Fixes: adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
Cc: Phil Auld <pauld@redhat.com>
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
---
kernel/sched/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 60afadb6eede..a490d34cc65a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1136,6 +1136,7 @@ void __trace_set_need_resched(struct task_struct *curr, int tif)
{
trace_sched_set_need_resched_tp(curr, smp_processor_id(), tif);
}
+EXPORT_SYMBOL_GPL(__trace_set_need_resched);
void resched_curr(struct rq *rq)
{
base-commit: 0f61b1860cc3f52aef9036d7235ed1f017632193
--
2.52.0
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] sched: Fix build for modules using set_tsk_need_resched()
2026-01-12 14:04 [PATCH] sched: Fix build for modules using set_tsk_need_resched() Gabriele Monaco
@ 2026-01-12 14:50 ` Phil Auld
2026-01-15 21:44 ` [tip: sched/core] " tip-bot2 for Gabriele Monaco
1 sibling, 0 replies; 5+ messages in thread
From: Phil Auld @ 2026-01-12 14:50 UTC (permalink / raw)
To: Gabriele Monaco; +Cc: linux-kernel, Ingo Molnar, Peter Zijlstra
On Mon, Jan 12, 2026 at 03:04:13PM +0100 Gabriele Monaco wrote:
> Commit adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
> added a tracepoint to the need_resched action that can be triggered also
> by set_tsk_need_resched.
> This function was previously accessible from out-of-tree modules but
> it's no longer available because the __trace_set_need_resched() symbol
> is not exported (together with the tracepoint itself, which was exported
> in a separate patch) and building such modules fails.
>
> Export __trace_set_need_resched to modules to fix those build issues.
>
> Fixes: adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
> Cc: Phil Auld <pauld@redhat.com>
> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
> ---
> kernel/sched/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 60afadb6eede..a490d34cc65a 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1136,6 +1136,7 @@ void __trace_set_need_resched(struct task_struct *curr, int tif)
> {
> trace_sched_set_need_resched_tp(curr, smp_processor_id(), tif);
> }
> +EXPORT_SYMBOL_GPL(__trace_set_need_resched);
>
> void resched_curr(struct rq *rq)
> {
>
> base-commit: 0f61b1860cc3f52aef9036d7235ed1f017632193
> --
> 2.52.0
>
Thanks Gabriele! And good catch that the other patch is not sufficient.
Reviewed-by: Phil Auld <pauld@redhat.com>
--
^ permalink raw reply [flat|nested] 5+ messages in thread* [tip: sched/core] sched: Fix build for modules using set_tsk_need_resched()
2026-01-12 14:04 [PATCH] sched: Fix build for modules using set_tsk_need_resched() Gabriele Monaco
2026-01-12 14:50 ` Phil Auld
@ 2026-01-15 21:44 ` tip-bot2 for Gabriele Monaco
2026-01-15 23:38 ` Phil Auld
1 sibling, 1 reply; 5+ messages in thread
From: tip-bot2 for Gabriele Monaco @ 2026-01-15 21:44 UTC (permalink / raw)
To: linux-tip-commits
Cc: Gabriele Monaco, Peter Zijlstra (Intel), Phil Auld, x86, linux-kernel
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 8d737320166bd145af70a3133a9964b00ca81cba
Gitweb: https://git.kernel.org/tip/8d737320166bd145af70a3133a9964b00ca81cba
Author: Gabriele Monaco <gmonaco@redhat.com>
AuthorDate: Mon, 12 Jan 2026 15:04:13 +01:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 15 Jan 2026 22:41:26 +01:00
sched: Fix build for modules using set_tsk_need_resched()
Commit adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
added a tracepoint to the need_resched action that can be triggered also
by set_tsk_need_resched.
This function was previously accessible from out-of-tree modules but
it's no longer available because the __trace_set_need_resched() symbol
is not exported (together with the tracepoint itself, which was exported
in a separate patch) and building such modules fails.
Export __trace_set_need_resched to modules to fix those build issues.
Fixes: adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Phil Auld <pauld@redhat.com>
Link: https://patch.msgid.link/20260112140413.362202-1-gmonaco@redhat.com
---
kernel/sched/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b033f97..3cca012 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1139,6 +1139,7 @@ void __trace_set_need_resched(struct task_struct *curr, int tif)
{
trace_sched_set_need_resched_tp(curr, smp_processor_id(), tif);
}
+EXPORT_SYMBOL_GPL(__trace_set_need_resched);
void resched_curr(struct rq *rq)
{
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [tip: sched/core] sched: Fix build for modules using set_tsk_need_resched()
2026-01-15 21:44 ` [tip: sched/core] " tip-bot2 for Gabriele Monaco
@ 2026-01-15 23:38 ` Phil Auld
2026-01-28 22:48 ` Phil Auld
0 siblings, 1 reply; 5+ messages in thread
From: Phil Auld @ 2026-01-15 23:38 UTC (permalink / raw)
To: linux-kernel
Cc: linux-tip-commits, Gabriele Monaco, Peter Zijlstra (Intel), x86
On Thu, Jan 15, 2026 at 09:44:19PM -0000 tip-bot2 for Gabriele Monaco wrote:
> The following commit has been merged into the sched/core branch of tip:
>
> Commit-ID: 8d737320166bd145af70a3133a9964b00ca81cba
> Gitweb: https://git.kernel.org/tip/8d737320166bd145af70a3133a9964b00ca81cba
> Author: Gabriele Monaco <gmonaco@redhat.com>
> AuthorDate: Mon, 12 Jan 2026 15:04:13 +01:00
> Committer: Peter Zijlstra <peterz@infradead.org>
> CommitterDate: Thu, 15 Jan 2026 22:41:26 +01:00
>
Thank you for both of these, Peter!
Cheers,
Phil
> sched: Fix build for modules using set_tsk_need_resched()
>
> Commit adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
> added a tracepoint to the need_resched action that can be triggered also
> by set_tsk_need_resched.
> This function was previously accessible from out-of-tree modules but
> it's no longer available because the __trace_set_need_resched() symbol
> is not exported (together with the tracepoint itself, which was exported
> in a separate patch) and building such modules fails.
>
> Export __trace_set_need_resched to modules to fix those build issues.
>
> Fixes: adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Reviewed-by: Phil Auld <pauld@redhat.com>
> Link: https://patch.msgid.link/20260112140413.362202-1-gmonaco@redhat.com
> ---
> kernel/sched/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index b033f97..3cca012 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1139,6 +1139,7 @@ void __trace_set_need_resched(struct task_struct *curr, int tif)
> {
> trace_sched_set_need_resched_tp(curr, smp_processor_id(), tif);
> }
> +EXPORT_SYMBOL_GPL(__trace_set_need_resched);
>
> void resched_curr(struct rq *rq)
> {
>
--
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [tip: sched/core] sched: Fix build for modules using set_tsk_need_resched()
2026-01-15 23:38 ` Phil Auld
@ 2026-01-28 22:48 ` Phil Auld
0 siblings, 0 replies; 5+ messages in thread
From: Phil Auld @ 2026-01-28 22:48 UTC (permalink / raw)
To: linux-kernel
Cc: linux-tip-commits, Gabriele Monaco, Peter Zijlstra (Intel), x86
Hi Peter and Gabriele,
On Thu, Jan 15, 2026 at 06:38:03PM -0500 Phil Auld wrote:
> On Thu, Jan 15, 2026 at 09:44:19PM -0000 tip-bot2 for Gabriele Monaco wrote:
> > The following commit has been merged into the sched/core branch of tip:
> >
> > Commit-ID: 8d737320166bd145af70a3133a9964b00ca81cba
> > Gitweb: https://git.kernel.org/tip/8d737320166bd145af70a3133a9964b00ca81cba
> > Author: Gabriele Monaco <gmonaco@redhat.com>
> > AuthorDate: Mon, 12 Jan 2026 15:04:13 +01:00
> > Committer: Peter Zijlstra <peterz@infradead.org>
> > CommitterDate: Thu, 15 Jan 2026 22:41:26 +01:00
> >
>
> Thank you for both of these, Peter!
Well, I think this one and the related one need to lose the _GPL because
they are called from things, like wake_up_process(), which are exported
without that restriction. This essentially adds _GPL to that and
anything else that ends up in resched_curr().
I prefer to add new symbols _GPL too but this case seems different.
Thoughts?
I can spin up a patch against tip:sched/core if you want it.
Cheers,
Phil
>
> > sched: Fix build for modules using set_tsk_need_resched()
> >
> > Commit adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
> > added a tracepoint to the need_resched action that can be triggered also
> > by set_tsk_need_resched.
> > This function was previously accessible from out-of-tree modules but
> > it's no longer available because the __trace_set_need_resched() symbol
> > is not exported (together with the tracepoint itself, which was exported
> > in a separate patch) and building such modules fails.
> >
> > Export __trace_set_need_resched to modules to fix those build issues.
> >
> > Fixes: adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model")
> > Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Reviewed-by: Phil Auld <pauld@redhat.com>
> > Link: https://patch.msgid.link/20260112140413.362202-1-gmonaco@redhat.com
> > ---
> > kernel/sched/core.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index b033f97..3cca012 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -1139,6 +1139,7 @@ void __trace_set_need_resched(struct task_struct *curr, int tif)
> > {
> > trace_sched_set_need_resched_tp(curr, smp_processor_id(), tif);
> > }
> > +EXPORT_SYMBOL_GPL(__trace_set_need_resched);
> >
> > void resched_curr(struct rq *rq)
> > {
> >
>
> --
>
--
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-28 22:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-12 14:04 [PATCH] sched: Fix build for modules using set_tsk_need_resched() Gabriele Monaco
2026-01-12 14:50 ` Phil Auld
2026-01-15 21:44 ` [tip: sched/core] " tip-bot2 for Gabriele Monaco
2026-01-15 23:38 ` Phil Auld
2026-01-28 22:48 ` Phil Auld
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®