[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b18b631-c570-43fa-ac76-a09f0fb4363e@igalia.com>
Date: Thu, 5 Jun 2025 07:28:36 +0200
From: Changwoo Min <changwoo@...lia.com>
To: Andrea Righi <arighi@...dia.com>, Tejun Heo <tj@...nel.org>,
David Vernet <void@...ifault.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] sched_ext: Make scx_locked_rq() shared
Hi Andrea,
On 6/4/25 23:33, Andrea Righi wrote:
> scx_locked_rq() is used both from ext.c and ext_idle.c, so make it
> public and declare its prototype in ext.h.
scx_rq_bypassing() is the same, but it is defined with "static inline".
Would it be better to define with "static inline" for consistency? And,
anyway scx_rq_bypassing() is used only within ext*.
Regards,
Changwoo Min
>
> No functional changes.
>
> Signed-off-by: Andrea Righi <arighi@...dia.com>
> ---
> kernel/sched/ext.c | 2 +-
> kernel/sched/ext.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 3e483138dff60..941603ec67e27 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -1265,7 +1265,7 @@ static inline void update_locked_rq(struct rq *rq)
> * Return the rq currently locked from an scx callback, or NULL if no rq is
> * locked.
> */
> -static inline struct rq *scx_locked_rq(void)
> +struct rq *scx_locked_rq(void)
> {
> return __this_cpu_read(locked_rq);
> }
> diff --git a/kernel/sched/ext.h b/kernel/sched/ext.h
> index d30f2d1bc00d5..cda5dfa4dad09 100644
> --- a/kernel/sched/ext.h
> +++ b/kernel/sched/ext.h
> @@ -18,6 +18,8 @@ static inline bool scx_rq_bypassing(struct rq *rq)
> return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
> }
>
> +struct rq *scx_locked_rq(void);
> +
> DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup);
>
> void scx_tick(struct rq *rq);
Powered by blists - more mailing lists