From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E8E41D61B7 for ; Fri, 12 Jun 2026 18:05:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781287517; cv=none; b=MK8rGAR2kb1bQnPfmhntIpXHuUmnTdTM/H+af8JOyXR3dovJIUl6qQa+Nzx+6AVduIMGtaSqm0GuAB8JpFYPWQUmPId5ovds+2uYhApupkYEsS9RLDmPFPs5mJljgGbGjEgpdDIau2GLYfTh3mQmBMEqHHf6NrKQMyzatw9xl0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781287517; c=relaxed/simple; bh=P4S8iEOgiSbWE/6VQyfZTjIHpCHqjc0vp3OwKUmy1+w=; h=From:Subject:To:Cc:In-Reply-To:References:Content-Type:Date: Message-Id; b=HQt1otVB54BtWEPmFBf+End43QLggNLMeGFp21/NxBiIjdYn3c193HtsHWGP5fgp2NqyoEUgc6sCu8ZlblDUzxbACxdLdbCvKGahUrq9Lu2O9rpReYf5xIYCyVP+vrSVQZGCIalTBxJrfQ8ngrv8svh80E+kWrAbRMd2L9aMQsc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CN4hGasD; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CN4hGasD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECE831F000E9; Fri, 12 Jun 2026 18:05:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781287516; bh=L9T7Go2P8AiWGmZZpNWpY30mLEUMQuXbIGjMuGcBS50=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=CN4hGasD1Oq0t8PDe15DkFFBH/QTOc623jDyFnUNAYWXY7rvDeNE2uvJVE2X/bQaw qOOL4g7nuX3YPKi0b5cUSYeOiIzkQt0sHZ67YF9OC95MfVRqUu07XDpNe0035uN7dI FZAezNyh60m9O1qjL/Ql8eD7o2Wyd6OSJUOQT03gCJAgHB3yFILFBMKqMHMGImJlW1 qUhi3/E1K47lcj/w85gPjLimrF1NQ6LaUYVDoc73+Xht8b4qjA0EtSvehHwfF4Vuvq 3xdjRrBofN7FMkRPW/5iWQQigK2mS3yEjFFd2IdFJ0VqXHvzVbnciDq1+vr1EkHHQE oLehfEW4oVhdQ== From: sashiko-bot@kernel.org Subject: Re: [PATCH] sched_ext:SCX is preemptible by the Fair scheduler Reply-To: sashiko-reviews@lists.linux.dev To: "Cui Jian" Cc: sched-ext@lists.linux.dev In-Reply-To: <20260612175113.110447-1-cjian720@163.com> References: <20260612175113.110447-1-cjian720@163.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 12 Jun 2026 18:05:15 +0000 Message-Id: <20260612180515.ECE831F000E9@smtp.kernel.org> Precedence: bulk X-Mailing-List: sched-ext@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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_PREEM= PT_UNKNOWN without updating tools/sched_ext autogenerated headers, breaking= feature detection for BPF schedulers. -- commit 19f50c7bbf7f31acfd835724319513f85b45249d Author: Cui Jian 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 re= ly 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, > }; --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260612175113.1104= 47-1-cjian720@163.com?part=3D1