All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Cui Jian" <cjian720@163.com>
Cc: sched-ext@lists.linux.dev
Subject: Re: [PATCH] sched_ext:SCX is preemptible by the Fair scheduler
Date: Fri, 12 Jun 2026 18:05:15 +0000	[thread overview]
Message-ID: <20260612180515.ECE831F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260612175113.110447-1-cjian720@163.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Inserting SCX_CPU_PREEMPT_FAIR shifts the value of SCX_CPU_PREEMPT_UNKNOWN without updating tools/sched_ext autogenerated headers, breaking feature detection for BPF schedulers.
--

commit 19f50c7bbf7f31acfd835724319513f85b45249d
Author: Cui Jian <cjian720@163.com>

sched_ext:SCX is preemptible by the Fair scheduler

This commit adds the SCX_CPU_PREEMPT_FAIR enum value to distinguish
preemptions caused by the Fair scheduler. It updates the core sched_ext
code to report this reason when the next scheduled task belongs to the
fair_sched_class.

> diff --git a/kernel/sched/ext_internal.h b/kernel/sched/ext_internal.h
> index a075732d4430d..3ce07bec58a55 100644
> --- a/kernel/sched/ext_internal.h
> +++ b/kernel/sched/ext_internal.h
> @@ -241,6 +241,8 @@ enum scx_cpu_preempt_reason {
>  	SCX_CPU_PREEMPT_DL,
>  	/* next task is being scheduled by &sched_class_stop */
>  	SCX_CPU_PREEMPT_STOP,
> +	/* next task is being scheduled by &sched_class_fair*/
> +	SCX_CPU_PREEMPT_FAIR,

[Severity: Medium]
Does inserting SCX_CPU_PREEMPT_FAIR here shift the value of
SCX_CPU_PREEMPT_UNKNOWN and potentially break existing BPF programs that rely
on its previous value or use it as a maximum for array sizing?

Also, should tools/sched_ext/include/scx/enum_defs.autogen.h be updated to
include #define HAVE_SCX_CPU_PREEMPT_FAIR? Without it, BPF schedulers might
fail to detect this new feature via #ifdef, potentially mishandling the new
enum value.

>  	/* unknown reason for SCX being preempted */
>  	SCX_CPU_PREEMPT_UNKNOWN,
>  };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260612175113.110447-1-cjian720@163.com?part=1

  parent reply	other threads:[~2026-06-12 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 17:51 [PATCH] sched_ext:SCX is preemptible by the Fair scheduler Cui Jian
2026-06-12 18:00 ` Andrea Righi
2026-06-12 18:05 ` sashiko-bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-06-12 16:14 Cui Jian
2026-06-12 16:28 ` sashiko-bot
2026-06-12 16:32 ` Andrea Righi
2026-06-12 15:23 Cui Jian
2026-06-12 15:38 ` sashiko-bot

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=20260612180515.ECE831F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=cjian720@163.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sched-ext@lists.linux.dev \
    /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.