From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.201.6 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796366701; b=NOLS7JNDBrZq9RgiY2hsOY19y8TChw9kKLA/56fggYhPwEWx5PDX56BxxsdcL7e8jPDo BcmMmQSE8mYeQxdDNjsfPkTHEq6HeWlhTXd+DIglZdsfxqL+9ZTOa1Hia7yjRRiI9LUYk hE3+V2+78uC7/LtSW/JfExoVJzoU3kF+IZ5Nf/W9qpT9bbgnhpQsWaQ+oW63Eg9FfPHUc I3bdArfQbHmCSD4fUSK9l9eFJdMmPYUk9WgulUmD5gysB4d5xRVa4RdA0DmCHNXtphd7x AfW2guGfKlGSshdlQ6VG1rKNweqtRn8piPDi74YdxuwCmT1tvTVUZOGYfUWRW9BgJqA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796366701; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:Content-Type:Content-Disposition: In-Reply-To:X-ClientProxiedBy:MIME-Version:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=IeouVopetkOETTY4LWpaz9FN7trKCeRaWWoves2ZVl8=; b=YfXMX7IcitMjIWhBzWvgfET8pol1c87l2IyXNbpYs8ME3OpU/QtD7cfOXZ1WCSGwKOML Gs916o91LKPwW+eXzgM3zl5ajC3KwEl46XARoJyq+fPkIv9KDlhoWYIHau4ruXQM0/ktj zpAfAY19+W7YAPCVK7/20cUVCKJRVvlbpDyrRAyVnWAZ+bVgn6pIz8pCoV6o6JZT80u5s 5c5B+EwjEdVD1wy/apjpAjMLpK/oUAB6ndajfO2mg5jzxVYBj8mFx4DyL8Ek5M1nWJFeM ufOLy0egL3GV+3veWo+kg/h46WaI9aShomkxGxbWrjnLSMG1s+ABsLXp0PqZeL6nahA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=YdSUBqR9; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.201.6 Received: from PH7PR06CU001.outbound.protection.outlook.com (mail-westus3azon11010006.outbound.protection.outlook.com [52.101.201.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B8B0606A335 for ; Fri, 4 Dec 2026 06:45:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9B8B0606A335 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=YdSUBqR9 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PtKR9p3TcCrzacknyNKd4k12NS40jH+TtsU65Uu+QANxfI9hSy6dghGhhX2GPgNJdAGHecnB2HiEGHMGZ9APyfMUymwu5iqc0ho2YwxSNuNdb/dCmynJP8flrqgyPXl5v33tQk3oAPCo2DaKm92vB2WKPhO/ZftAYwcZxDl+Ueupj9MDVzIkE8I0MpP5pubirPeVFsj2I7FoFkL/mbCbITsGTXiRhsfpPyAgAoR1f7E8Pajg8qYbsbwg8XBuNH2+7rTYkyzSyUVxzIwNIHZHaSvAeh816mtqMJ5kJzpt2myVsdXtMiLA4ScgC44cAfEuSPRS+QEZwImFllTjs57nUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IeouVopetkOETTY4LWpaz9FN7trKCeRaWWoves2ZVl8=; b=pZfM9421+ZwB49HKab6r2/nrPpeYhyDYin7J7qduTIJNRFw7jekvY4o1g/aSrdIRsm4YG9oDhQFoYxRkMW4MVPHmfvbe0k6sRlCmFk9hdEyLP5E7i2pz5q7LQ7eEbMz14/MexH9S88SJk8Eo33+e/AVKoeepHYD11fmdCKqlZpUZVQhvWmjGWePvmmK4n5U0Wxqx2YOuyjLCthAwNCbNSNOvvn7yRQjfnBlB+3rYLzIRXv8GjW30VggJhFLCArkcErraAGkJafhr1kM1S2LpM283WOsVxiGKrSZpPO6o+7NSst2SRbcOnkiIT+mOTpdo4OtxoZ/sXBPnC0TQPoFIyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IeouVopetkOETTY4LWpaz9FN7trKCeRaWWoves2ZVl8=; b=YdSUBqR9wFr059Pa/rFKDdCi4393qpedq/KEWUX4cLsnLqdMZ0xUoTH9B0JQNjl352ztlRcSWK4YL/N3VFKV7M5feGoe/0KuWgOgRlXkDAmX+uGMs5x3ib43rxEv9k7QA0w9bzWE5y5LgexsJQBkGF5WjCWS560/Rh/4J7aDhMvgWSj/H+Lw+F0FcsIedn8X9rapxvt+f6Y+UuUwl4r/sP7ul/AFAXw/ojwfEFTt7dMCUzkOTuh0e8y8n3EsAPjgoMORkgKlKIO2q0i/EJNtRyWE8T4eK0TonSMRQ2Sxjt0+sUPaOunpp0MJThcjDTo6Bb/CAT/vRXDLSreVxFzdIQ== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BL1PR12MB5174.namprd12.prod.outlook.com (2603:10b6:208:31c::19) by DS7PR12MB5984.namprd12.prod.outlook.com (2603:10b6:8:7f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.13; Fri, 4 Dec 2026 06:44:55 +0000 Received: from BL1PR12MB5174.namprd12.prod.outlook.com ([fe80::58de:822b:868:96e9]) by BL1PR12MB5174.namprd12.prod.outlook.com ([fe80::58de:822b:868:96e9%5]) with mapi id 15.21.0688.010; Fri, 4 Dec 2026 06:44:54 +0000 Date: Fri, 4 Dec 2026 07:44:46 +0100 From: Andrea Righi To: Changwoo Min Cc: tj@kernel.org, void@manifault.com, david.dai@linux.dev, Gavin Guo , kernel-dev@igalia.com, sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/8] sched_ext: Add scx_bpf_sched_id() and scx_bpf_task_sched_id() Message-ID: References: <20261203045618.982539-1-changwoo@igalia.com> <20261203045618.982539-4-changwoo@igalia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261203045618.982539-4-changwoo@igalia.com> X-ClientProxiedBy: MI1P293CA0029.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:3::15) To BL1PR12MB5174.namprd12.prod.outlook.com (2603:10b6:208:31c::19) X-Mailing-List: sched-ext@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5174:EE_|DS7PR12MB5984:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a2eafb1-d3e5-477f-9d74-08df51d21aa5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|23010399003|5023799004|4143699003|11063799006|6133799003|261009223027099003|22082099003|18002099003|10067099003|56012099006|261102123227099003|261021135927099003|261021121427099003|261022075727099003; X-Microsoft-Antispam-Message-Info: PbpRU5y+SI0M3FXR2neUdyYV04XELIHzOfspAcLzPyZEE1Z4T20tEezbI4bljzHPtjhxUE8GoUgmbmHHX0z/em3xjmQnnY7VYB6BW/MqafQrS8RbCf0RRzXsBqbiL8umK67JI0C2iAO/8DD+ed7CYo789JV7wxJ82auKXhaN9Ipg61Qjy4KHBwDMyvJBvIJcYyf2IXbsedbBogupsfG/Qe0+Wm6F1eVAUmeK3PDwbV+MLn/F+ZNhsttyYvIw39ONQqsQmPrjfmv4s0atuysxoZ2kV6tv+pxP+hMKk8mXSk7NXAx54HWETV1i8ZfxWs6di6QjQX+KCT5yuE/Q4eVx6H9LRK0mN7V6Fee2FWcLxERTXTnx67k1ymneUemIjnNxhAU4a5HAh9jt+Ogvq+FEZrXJP7wDCVRoujHikB367XKxP9qqtNHAhtD3a/az/lePqbPE02GIF84wTgrLagreqyDAaRO9TIFU4YbZkj5GwooYvIBZbZ6FQBNUbNxZFeK04pb5ut0nGplZAFetgjzkl7uhWiAy/srz+QQsQSK33kpZT6pmNPrdKrXp83UHc7fahKmm8yhT4TIjuDTMvvFPLDq3vWS34tiPY5vwknbZmSH+M3zYqVcXZt+++mH0l7ZM3YzfonXHDs5D4DGj5gRl4NWifRvuJp8pwKccua4mKzY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR12MB5174.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(23010399003)(5023799004)(4143699003)(11063799006)(6133799003)(261009223027099003)(22082099003)(18002099003)(10067099003)(56012099006)(261102123227099003)(261021135927099003)(261021121427099003)(261022075727099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?BeQ64q3eIh06bJ8CvYF00wBa/P8khvaYlsb6llzvcDf/jBHkku+WQqdOkKMd?= =?us-ascii?Q?Bjr5rkIR8mDLuI2Ux+Fta69h+qqsg473KasTn/oeYhuaSYHLxAgkYRqbw2yH?= =?us-ascii?Q?eNNWdgEfdqlO99XqX9aSpTNBsO2EX/MIB8YUg+bTl9e9ni3L9nejJv/HBqR4?= =?us-ascii?Q?dgv/QXrsbZuRnPL3EnKrmi10gak+Fas/DxNoayRL4zHVjEWLaXONRdqsSRXX?= =?us-ascii?Q?KJ6BLh+xgRp8/7nM1fJEwaCwgKh1P5qVfso7l2jsltV3HWhLXLqGQCi1D8dY?= =?us-ascii?Q?iANtmtDp3+mOprRBdaVl6nY2Tbrqrecm0njkLVkex+GSpEjgWljuz6OLauY+?= =?us-ascii?Q?UfEnirDD2rndDGSOEU5YJ3xGn6NCP7JlEprFjFrF3sGN9/mYvwM//7bDHXxq?= =?us-ascii?Q?fg7w3SZ3OP7+SNDOKvTTlzNDVMj+c/lFWBO4UUV10X948ZLkLgOqAlHi8Byc?= =?us-ascii?Q?lAV/5m1wUgxvg2czBAVgbNpoXaF1m1fVhFUnb38E5FMBPoT3VfPcSuwJOl20?= =?us-ascii?Q?68m3GSyH+esJv1s1mnDhQPn+VJMoLAgGIo+Y8rA6EQdGnK5m338JodWVQnNG?= =?us-ascii?Q?o7lqOx9Ae8pcjRN973iHFkl+I2SsNfq0VLUEvbRvll+mnCCKrVPTCS6rHLej?= =?us-ascii?Q?F5yYXqB008DCXvmx24lc+soolW8ZH2JUkjZ2iIRrHDGYBPvUujvr2b3OtTn3?= =?us-ascii?Q?EPgahPOYvh+B4ZXJ8WET4DUkFVDSDrdHt8tJsOiVfQlQKmJ1vUSabd8YJLkA?= =?us-ascii?Q?r003VahPGShEaspe76djvM/Phc8nlY15/8cVEi6NzVhyhy77fa/XKh+fARIl?= =?us-ascii?Q?bN6bCEdc+cG0CKUJDFpFMMMmR4xw6xSC3rKmabhDIi3dWvnWo+UEa8IqzeFL?= =?us-ascii?Q?D+YVIRgei42V6gqrdLIsmBRJucbaiSDOdZzZ5/7I2BOtREWt/4R849zQ4mHO?= =?us-ascii?Q?RY6yJirk6ezo3JHWDGmf/2hMneBIxvBhGSs+yeyQjv7J/p0AUYwLUaO28br7?= =?us-ascii?Q?MqkkdWNBRKElqjkKUot3jqeAnl38KndYt3gLlSga6KWXxzbd7hEMRqIKbN3t?= =?us-ascii?Q?4EohcBk5BtfAx1Nfh+XRWQxSwZEpU4LTeuu2YvVxAFM3IfXwatMid6IXprwp?= =?us-ascii?Q?05aS+ECABgJR+ilmzeqNhg3FYkpgaEZW9ygxmbV8vyOiV/tuRLfVcukm7njr?= =?us-ascii?Q?Vxxo95xRALh3NYmBRwtqvoBg2I9yJafDtTBDJJHtvxLCSecmavJ+3Y5vtiUU?= =?us-ascii?Q?N07LPro01pOfpm81/w9SO7UhM4FZoRUKEKZY+GXMi7M5lHppP04aqlvHM5PZ?= =?us-ascii?Q?YsIUin3LCy+xbCv78Sw97556hiRmLzaqegQ6cAEwL8IabZeBbNcwQxPKVW29?= =?us-ascii?Q?+5XehDtPK4Ala69vwYBVoqOqzmQPlfCToB2YOVWdiyT3kJxBA4yTrBRl3rg1?= =?us-ascii?Q?eN5aLNuJdVukVHquTgZWyVDpSA0430FjmA0VdOU9uSXQorefLhTH6K4aQc5Z?= =?us-ascii?Q?6WQACHyeXy21q978Wr8goYoxMpPnP9Bil0cB6tt1d9mgCtDIv9krDA/PlS/y?= =?us-ascii?Q?L77dYtz2YG5mW3mchvwlOlmO6vcm3LVNH5VKxJmtkw+uGNTu208XLc9wvFfX?= =?us-ascii?Q?pMOWyTeU0Lg34ctF+tVCYvg1h3+UXcOs4g1zhb5MIU0LiGOyIjZQ5moBEdw9?= =?us-ascii?Q?pzvWldVq5DuUDQTL7MmB8xRv4ote89itgsd47fFXTcfhj/EMPu/wW9fdRtPi?= =?us-ascii?Q?MXpzsJxg8A=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a2eafb1-d3e5-477f-9d74-08df51d21aa5 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5174.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 06:44:54.8221 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hZlhrGXd/pdcc8J4vFuL1f3hw0f/XoiSxUBUfXV1u+CPOM8/XDPFcOZDJRAcypJIXg2J2gmocRG0xof4Kaiocg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5984 Hi Changwoo, On Thu, Dec 03, 2026 at 01:56:13PM +0900, Changwoo Min wrote: > A BPF scheduler can't tell which scheduler instance it is or which one > owns a task. With sub-schedulers, a task it reaches as a waker, from a > tracing program or by iteration may belong to another scheduler, and a > value that scheduler stored in the task means nothing to it. > > Every scx_sched already has an id that starts at 1, increases > monotonically and is never reused. Add scx_bpf_sched_id(), the calling > scheduler's id, and scx_bpf_task_sched_id(), the id of the scheduler > that owns a task, both 0 for none. Any context may call them. > > Signed-off-by: Changwoo Min > --- > kernel/sched/ext/ext.c | 35 ++++++++++++++++++++++++ > tools/sched_ext/include/scx/compat.bpf.h | 22 +++++++++++++++ > 2 files changed, 57 insertions(+) > > diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c > index 7e5f58f1d844..2ebc67916757 100644 > --- a/kernel/sched/ext/ext.c > +++ b/kernel/sched/ext/ext.c > @@ -11940,6 +11940,39 @@ __bpf_kfunc s32 scx_bpf_task_cpu(const struct task_struct *p) > return task_cpu(p); > } > > +/** > + * scx_bpf_sched_id - Id of the calling scheduler > + * @aux: implicit BPF argument to access bpf_prog_aux hidden from BPF progs > + * > + * Return the calling scheduler's instance id, 0 if there is none. Ids start at > + * 1, increase monotonically and are never reused. > + */ > +__bpf_kfunc u64 scx_bpf_sched_id(const struct bpf_prog_aux *aux) > +{ > + struct scx_sched *sch; > + > + guard(rcu)(); > + sch = scx_prog_sched(aux); > + return sch ? sch->id : 0; > +} > + > +/** > + * scx_bpf_task_sched_id - Id of the scheduler that owns a task > + * @p: task of interest > + * > + * Return the instance id of the scheduler @p is on, see scx_bpf_sched_id(), 0 > + * if @p is not on any. Without the rq lock of @p, @p may move to another > + * scheduler right after. > + */ > +__bpf_kfunc u64 scx_bpf_task_sched_id(struct task_struct *p) > +{ > + struct scx_sched *sch; > + > + guard(rcu)(); > + sch = scx_task_sched_rcu(p); > + return sch ? sch->id : 0; > +} Instead of introducing this as a kfunc, can we provide a compat.bpf.h helper like this? struct scx_sched___id { u64 id; } __attribute__((preserve_access_index)); struct sched_ext_entity___sched { struct scx_sched___id *sched; } __attribute__((preserve_access_index)); static __always_inline u64 scx_task_sched_id(struct task_struct *p) { struct sched_ext_entity___sched *scx = (void *)&p->scx; struct scx_sched___id *sch; if (!bpf_core_field_exists(scx->sched) || !bpf_core_field_exists(struct scx_sched___id, id)) return 0; sch = READ_ONCE(scx->sched); return sch ? READ_ONCE(sch->id) : 0; } Thanks, -Andrea > + > /** > * scx_bpf_task_cid - cid a task is currently associated with > * @p: task of interest > @@ -12262,6 +12295,8 @@ BTF_ID_FLAGS(func, scx_bpf_get_online_cpumask, KF_ACQUIRE) > BTF_ID_FLAGS(func, scx_bpf_put_cpumask, KF_RELEASE) > BTF_ID_FLAGS(func, scx_bpf_task_running, KF_RCU) > BTF_ID_FLAGS(func, scx_bpf_task_cpu, KF_RCU) > +BTF_ID_FLAGS(func, scx_bpf_sched_id, KF_IMPLICIT_ARGS) > +BTF_ID_FLAGS(func, scx_bpf_task_sched_id, KF_RCU) > BTF_ID_FLAGS(func, scx_bpf_task_cid, KF_RCU) > BTF_ID_FLAGS(func, scx_bpf_locked_rq, KF_IMPLICIT_ARGS | KF_RET_NULL) > BTF_ID_FLAGS(func, scx_bpf_cpu_curr, KF_IMPLICIT_ARGS | KF_RET_NULL | KF_RCU_PROTECTED) > diff --git a/tools/sched_ext/include/scx/compat.bpf.h b/tools/sched_ext/include/scx/compat.bpf.h > index 3520a749f8ce..41882c6497ac 100644 > --- a/tools/sched_ext/include/scx/compat.bpf.h > +++ b/tools/sched_ext/include/scx/compat.bpf.h > @@ -487,6 +487,28 @@ static inline void scx_bpf_task_set_lazy_resched(struct task_struct *p, bool laz > scx_bpf_task_set_lazy_resched___new(p, lazy); > } > > +/* > + * v7.x: Add scx_bpf_sched_id() and scx_bpf_task_sched_id(). Ids start at 1, > + * increase monotonically and are never reused. 0 means no scheduler, including > + * on kernels without the kfuncs. > + */ > +u64 scx_bpf_sched_id___new(void) __ksym __weak; > +u64 scx_bpf_task_sched_id___new(struct task_struct *p) __ksym __weak; > + > +static inline u64 scx_bpf_sched_id(void) > +{ > + if (bpf_ksym_exists(scx_bpf_sched_id___new)) > + return scx_bpf_sched_id___new(); > + return 0; > +} > + > +static inline u64 scx_bpf_task_sched_id(struct task_struct *p) > +{ > + if (bpf_ksym_exists(scx_bpf_task_sched_id___new)) > + return scx_bpf_task_sched_id___new(p); > + return 0; > +} > + > /* > * v7.1: New scx_bpf_dsq_reenq() that allows re-enqueues on more DSQs. This > * will eventually deprecate scx_bpf_reenqueue_local(). > -- > 2.56.1 >