All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tejun Heo" <tj@kernel.org>
Cc: sched-ext@lists.linux.dev
Subject: Re: [PATCH 4/5] sched_ext: Factor out scx_cpuperf_set()
Date: Fri, 24 Jul 2026 18:30:56 +0000	[thread overview]
Message-ID: <20260724183056.C9DC41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260724182125.985061-5-tj@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Kernel-doc comment disconnected from its intended function.
--

--- Patch [4]: [PATCH 4/5] sched_ext: Factor out scx_cpuperf_set() ---
commit b27126d56fa54ad2d995a8ef1399b04f6ce7c044
Author: Tejun Heo <tj@kernel.org>

sched_ext: Factor out scx_cpuperf_set()

This commit factors out the CPU performance target write from
scx_bpf_cpuperf_set() into a new internal scx_cpuperf_set() helper. It also
flattens the nested validation into early returns to prepare for future
changes.

> diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
> index d78b28d39d46c..00fe8490050df 100644
> --- a/kernel/sched/ext/ext.c
> +++ b/kernel/sched/ext/ext.c
> @@ -9793,49 +9793,60 @@ __bpf_kfunc u32 scx_bpf_cidperf_cur(s32 cid, const struct bpf_prog_aux *aux)
>   * use. Consult hardware and cpufreq documentation for more information. The
>   * current performance level can be monitored using scx_bpf_cpuperf_cur().
>   */
> -__bpf_kfunc void scx_bpf_cpuperf_set(s32 cpu, u32 perf, const struct bpf_prog_aux *aux)
> +static s32 scx_cpuperf_set(struct scx_sched *sch, s32 cpu, u32 perf)

[Severity: Low]
Does this disconnect the kernel-doc comment from its intended function?

By placing the new static helper scx_cpuperf_set() directly under the
kernel-doc block for scx_bpf_cpuperf_set(), kernel-doc will parse this as
the documentation for the helper instead of the kfunc.

This will trigger kernel-doc warnings during documentation builds about
mismatched function names and arguments (such as missing @sch and @aux),
and leaves the public kfunc scx_bpf_cpuperf_set() undocumented in the
generated kernel documentation.

>  {
> -	struct scx_sched *sch;
> -
> -	guard(rcu)();
> -
> -	sch = scx_prog_sched(aux);
> -	if (unlikely(!sch))
> -		return;

[ ... ]

> +	if (!locked_rq)
> +		rq_unlock_irqrestore(rq, &rf);
> +
> +	return 0;
> +}
> +
> +__bpf_kfunc void scx_bpf_cpuperf_set(s32 cpu, u32 perf, const struct bpf_prog_aux *aux)
> +{
> +	struct scx_sched *sch;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260724182125.985061-1-tj@kernel.org?part=4

  reply	other threads:[~2026-07-24 18:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24 18:21 [PATCHSET sched_ext/for-7.3] sched_ext: Follow-up fixes and missing cap enforcement Tejun Heo
2026-07-24 18:21 ` [PATCH 1/5] tools/sched_ext: Don't restart over a pending exit request Tejun Heo
2026-07-24 18:21 ` [PATCH 2/5] sched_ext: Gate local DSQ reenq on baseline cid access Tejun Heo
2026-07-24 18:21 ` [PATCH 3/5] sched_ext: Count kicks denied for lacking " Tejun Heo
2026-07-24 18:21 ` [PATCH 4/5] sched_ext: Factor out scx_cpuperf_set() Tejun Heo
2026-07-24 18:30   ` sashiko-bot [this message]
2026-07-24 19:07     ` Tejun Heo
2026-07-24 18:21 ` [PATCH 5/5] sched_ext: Gate scx_bpf_cidperf_set() behind a new SCX_CAP_PERF Tejun Heo
2026-07-24 18:46   ` sashiko-bot
2026-07-24 19:07     ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2026-07-24 19:16 [PATCHSET v2 sched_ext/for-7.3] sched_ext: Follow-up fixes and missing cap enforcement Tejun Heo
2026-07-24 19:16 ` [PATCH 4/5] sched_ext: Factor out scx_cpuperf_set() 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=20260724183056.C9DC41F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sched-ext@lists.linux.dev \
    --cc=tj@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.