mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: David Vernet <void@manifault.com>,
	Changwoo Min <changwoo@igalia.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] sched_ext: Make scx_locked_rq() shared
Date: Wed, 4 Jun 2025 08:49:51 -1000	[thread overview]
Message-ID: <aECVTz-ERs2Y-59t@slm.duckdns.org> (raw)
In-Reply-To: <aECVGF4_qVIEwXk2@slm.duckdns.org>

On Wed, Jun 04, 2025 at 08:48:56AM -1000, Tejun Heo wrote:
> On Wed, Jun 04, 2025 at 04:33:14PM +0200, 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.
> > 
> > No functional changes.
> > 
> > Signed-off-by: Andrea Righi <arighi@nvidia.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);
> 
> Can you rename locked_rq to scx_locked_rq_var (or something else), expose it
> and then make scx_locked_rq() an inline function in ext.h. Alternatively, I
> think it'd be fine to drop the wrapper and let each user do
> __this_cpu_read(scx_locked_rq) too.

BTW, if you update this patch, no need to resend 1-3. Just send the updated
patch as a reply to this one.

Thanks.

-- 
tejun

  reply	other threads:[~2025-06-04 18:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04 14:33 [PATCH 0/4] sched_ext: Improve code modularization Andrea Righi
2025-06-04 14:33 ` [PATCH 1/4] sched_ext: idle: Remove unnecessary ifdef in scx_bpf_cpu_node() Andrea Righi
2025-06-04 14:33 ` [PATCH 2/4] sched_ext: idle: Make local functions static in ext_idle.c Andrea Righi
2025-06-04 14:33 ` [PATCH 3/4] sched_ext: Make scx_rq_bypassing() inline Andrea Righi
2025-06-04 14:33 ` [PATCH 4/4] sched_ext: Make scx_locked_rq() shared Andrea Righi
2025-06-04 18:48   ` Tejun Heo
2025-06-04 18:49     ` Tejun Heo [this message]
2025-06-05  5:28   ` Changwoo Min
2025-06-05  6:17     ` Andrea Righi
2025-06-05  9:30   ` [PATCH v2 4/4] sched_ext: Make scx_locked_rq() inline Andrea Righi
2025-06-09 16:26 ` [PATCH 0/4] sched_ext: Improve code modularization Tejun Heo

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=aECVTz-ERs2Y-59t@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=void@manifault.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

all inboxes | Powered by JetHome®