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.52.29 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796554652; b=JjhiCxfP5z7h8AkW89xux5KEgrOZRtCIVAeTWx63UFsyYJtY3zYKTOIMS+c4x46Ih+Uj fdV9GKx03mc5nY6SB0Q3Ymp0Go/zQaGaMib3NXYbMAM5A2Tbka9mzq4bsLn76ZpFo2/wp jD0wa+KUSshhI2i7I68l02msLQ7w74wr46xBwlScz7fO2Ii5PvbYk5r0neH6om9oVlpdK Gl8NxB7pNWiufAYWPnBfU79oivEdW/onv30VzGJxQn9Fvj69K1u/lDHxaS58PIPrNj7Zx QOg5OoAiI8CIc4LjA4TbTLSNeXW0X/Et91pqV1MLPywugfW/685v7++9V1Mfmngkj4w== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796554652; 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=hprLHsvxQQ99HEAj10ynVax7ajOuKrLp+mP55+HfsvI=; b=AHycGth961F3OgnJRUAHs4t6istRf15pTwPMCj7ebqyKoQypgEzILvoO2ytyml2+iFHM 3z9dcDjeIAboShp78DVZmSO3CRibJYSjs7LYhwEyiCI09mV8v/E7K2v2hZ8EDEqcywery 2OoxtmPi5zQVF88c5VKQRxMa2TgtsiRtcw6h4od6tgsgDI/WHEGp0rkQPhISCncFbNSQ0 r5nBq8tgHLw4Ix61akzyUTydhSwm4mrVSpr4EZu0fq7J14yrFteT5ml9X06B61KrLLYbt ouiut8lTbuxzuYedq/oDTZbGsenEF5AphzbwuMbEkUam7YKcsesig36H8Kn04dNXTgA== 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=cAVJSZlX; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.52.29 Received: from BL2PR02CU003.outbound.protection.outlook.com (mail-eastusazon11011029.outbound.protection.outlook.com [52.101.52.29]) (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 B917F606A31F for ; Sun, 6 Dec 2026 10:57:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B917F606A31F 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=cAVJSZlX ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UxYUH6kfNXqi7EG3/tieOzzjNZq6Bok3Jr7+hW86TTT6aoZAE6vmijLLLmu35aOsP7WnhocKFqxru5xCa9Ol5myg1JxIMVHDWPUhHSc0MXfU6JHYRpjyg4Y+hTEFlyN16o+RcNPmLy/LWNUNu5sx7dMKqBDc0BpF0F+fqGtx0CjE0YZRiuzVBve3GBXai2GMztBUFXEyy72hNHkqb6Kjk6NuY/9Wcpph0LebS7gNloYD1JbdpNZvFiJcrkU/CaGsAziW0dv/FJurw+pItxET0Fz2D95eLeG1lNs6XgSk1UeYmRiCIs6ESdQG1JyWZej13BkElai4S/fO1VCqgOXw8w== 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=hprLHsvxQQ99HEAj10ynVax7ajOuKrLp+mP55+HfsvI=; b=rYSCEy27FOqhKfHyC+KF2BwnpOKKXUS8mZMlM4Fd2HP/SKTvjGkr5OZCcmzD+kSpUEesheIHvEnAMfS5JL0pxNQCrsnO67Zqv9gypsv6aEeHvWl7izPWnXtorQh7KptWxx37ztiQ7DBWiUt/Y9X19ESSY7rWVdUJsiBtIR6wtipBIHWCPRfaQPgMTGmiY/MEyb048K8VYa4YRTmFJrs2BLOvzP4iNeRkmEZI2PW8AA679NIyz2PPPQq2fjI3CD40D+8BcebP7s7oqnw1BfezyA/ylDbkmyAl7kDKFvigiCtyrLnbUDjngVWAZ+ELqYuuLT9cfzKUKlAaJIW2aHGlFQ== 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=hprLHsvxQQ99HEAj10ynVax7ajOuKrLp+mP55+HfsvI=; b=cAVJSZlXm09i3ovUCrGJrTi4VNug88simvix7/UwQbgOx2dHjOTc8Ce4MH1y6cfRKCzzhAjnjhvtHG+7eLduP/8RUGWo/fgfSRdSQBG8oLYgYu8IB7F38cs1q/hC/xUF17mHQHbCkG16X187ZK9qtUop+zGygc53rT8YBh77Ph6tbfm6OVcRyCOk5cWMMRTfRDtNicuAMBxBod76e2QvapdVD+4ynDVdcxG1n/ESScivxuwylTQ/tJKldNYU3amNabHibS2kpBvmt1vaCDO8nsioy1CCMnEsuKwuM82UMtM+ydmTkHqQu41Boguq7cQcya7mXe2WNenwD/GQF5+gmQ== 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 PH8PR12MB7255.namprd12.prod.outlook.com (2603:10b6:510:224::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.13; Sun, 6 Dec 2026 10:57:26 +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.013; Sun, 6 Dec 2026 10:57:25 +0000 Date: Sun, 6 Dec 2026 11:57:16 +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 v3 0/6] sched_ext: Add p->scx.bpf_priv for O(1) task context lookup Message-ID: References: <20261206053728.2026272-1-changwoo@igalia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261206053728.2026272-1-changwoo@igalia.com> X-ClientProxiedBy: MI1PEPF000015C3.ITAP293.PROD.OUTLOOK.COM (2603:10a6:298:1::64e) To BN9PR12MB5179.namprd12.prod.outlook.com (2603:10b6:408:11c::18) X-Mailing-List: linux-kernel@vger.kernel.org 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_|PH8PR12MB7255:EE_ X-MS-Office365-Filtering-Correlation-Id: 046bdb25-9b92-4b9d-b8c5-08df5387b659 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016|23010399003|11063799006|6133799003|261009223027099003|22082099003|18002099003|56012099006|10067099003|261028144727099003|261102123227099003|261022105027099003|261022075727099003|261021121427099003|261026140227099003|261026121527099003|261021123027099003; X-Microsoft-Antispam-Message-Info: MFHiS4MBBc4JirNJHylOmsgvYI2n2BkkkoGsndKmgPnzAxSG2oG3FQEvj7o5bPvz0fKQ39WiW0oiAUDZ/XWwsG2buQ+1qUQOjQ0a3i6hh783bzlbGYl9uGIb5eACBBXaOcdgJeezTIrLD2QXWkLJVJDRhn3TiKFLpB7MSi/x8jPiZHl9FGPpruwTSXla7vuCP6n4145y8tiBgTg8KX+HaNh6N/511Ia/IzbZgWwX0okIaFpWDVwFebaCNa6/UN1EUSC9gLnG+ZOawyoRJrTKeMC7KASb4O/X4xO+0sxFPT+GgJUMSwghH2CFu4iJtopmlSZ6DBDxqluqnrWEuAfyOQepfkEqHN+bI0poWo230SPRrDiaxgs3wWjVBO8VcQBuEqZUzd0G9S57EffaiAMvnTP13KCd8OqenAR4dCuNvj97PW+SKFnr3HBYNNrBzZSUE/40NxfD3purUCRJ2RH6xFprOTwQPDCtQJ0nUH+KvGjhGVoxVTc6qmrrEKukvXIPSAFSOUtB8NoPLDMQMPPgVqtwGXlUFb3yDAdB4xmt6o3g14qfweQ6Xu0Glc+4pzKT8sCae6uNajEkR4er8d3euriD7hueF8e1PLIiVg2Efk2i0Rkq9yfyOavq/e+fFuCSBGP1XliIrjYpOkBZ8vkQvtu2Ise9357WOkuu4V3ispo= 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)(376014)(366016)(23010399003)(11063799006)(6133799003)(261009223027099003)(22082099003)(18002099003)(56012099006)(10067099003)(261028144727099003)(261102123227099003)(261022105027099003)(261022075727099003)(261021121427099003)(261026140227099003)(261026121527099003)(261021123027099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?EmwN3jRU2mKKOgQNbosGidbuCpXae40sfrCev1t6/WIBcaFLbwUlcqD3wOLz?= =?us-ascii?Q?xzEnUiX1mEE99AYM+8ZDbqGnC+bLeHIvEKTib9LWOXcErWFB1s7hwMGJ0i9B?= =?us-ascii?Q?9nTLNhPYoAv1vvVPnCHTC7vPFnJ2RSDuZ+hsb6Z+CmPjYVxMV2T1CGu6OvP2?= =?us-ascii?Q?2/IAe11+aTxV21mvijJFTCwdX+22wgQcDjsLjHcf3fzOgUPTXFC+peIc5dd4?= =?us-ascii?Q?FAAH6x4rq8RIopkGvt4cpGg1+kZI8vEYikjQnb61ZGaJV8YYzmLUf60GmHIi?= =?us-ascii?Q?UpScdL3dLwwJV2s2fYyotFILUKdrDM6QmfnUzVjxiJhF2jf8vO/woX8swMNf?= =?us-ascii?Q?CmoC3iN2gicr6+bSyjltfZY8VagLz5bRybobDUoqwQyfageKA//1RF4n7PTp?= =?us-ascii?Q?3VPYTkpSd11t/iWtYZRydrXFVusCfr+dp2kSpklG7xx2YH0q9h3q4vF9Wu8L?= =?us-ascii?Q?sR8MrJgjG4lsenaiIuQSAymkFb8h7fikiZmw/PFH2RR+LJ9zjHrNYBIwBbYZ?= =?us-ascii?Q?kj9oTnU94katTfM+NnQKLfKszLqWCXq6F8/P1FhxZbGDV2G6vrnpmPosFYao?= =?us-ascii?Q?WbvRrMz+rwUF9u0qpaa7B5ZgyGyvMiY0xCiyEZL2Hv23xCNGUlrA2Gsh8KBs?= =?us-ascii?Q?OFI+P7cJrtw1lgKH3Bd1oVa9Al/+LB/ilXIMXJZhUOK8INf+WsTawJOLsEF/?= =?us-ascii?Q?kLGkPP/Kz4rw+nY0Fjr7u5L+mOjvb6thm9xUamRmziJLte2qkaAIczS+cB4y?= =?us-ascii?Q?Dsf6qZMcCA+R39fSM142Z+1R6U6f4bQ9KGTaHJzenbjmAQeuvGie7P+OdTmi?= =?us-ascii?Q?1bWx201yX/pn+8BI58Yoa3MAVszHGn1XHCYjvECgskTCt4owqYQEzPSrsWaq?= =?us-ascii?Q?dx8QMMmi3g2I+Hd4XfneIT3EFEuQZS3/ksk43J7RCfaUP2/l7vBKLnme9sck?= =?us-ascii?Q?WeylX9O1Rg2GVXMkQzi+qMW6joZrOt15RKIjEi2zFaEfu8lJxRQszsmJ7uYR?= =?us-ascii?Q?U5iqjgMudNG5CUuYzbxQuOgrXmON/2wFUEAhfo6cmRMurIoRVLt/V/RKy9V0?= =?us-ascii?Q?ZaRhyhIqHrqq65d8ANTYbwa/Ey59p+uO8YKBsw4pMOoQjSiGbpoOpj/5qowg?= =?us-ascii?Q?B4qPqsFW6NLe/zgGDQ1r4Kxx6BNsFkNH7EoLdAD35/3hsXCSU8xIjrB0ft3a?= =?us-ascii?Q?FtMlwMt5HuaZ5OWmYoahTfeHOyaMzxFjZe+TPvunKa4mEbaqTeQLWfpdEqlf?= =?us-ascii?Q?DMNRCUx9UjqwzGuBYZaPUo5uwIjY/xpwISx22ykAKhyXBpU7DNbXldr4nKHV?= =?us-ascii?Q?1vJY9S82i3njOht73wOmjkIg1ZB0cdxyIzuLH5DD1wS44Lmm6XNfypwkRl3c?= =?us-ascii?Q?VonQVbOXr8wXpXNhPIqDqM96Uzi4s/vAvqRcKYM3uRJ/DdTtIQoWvaJLs3aO?= =?us-ascii?Q?KbEGMFfx6NwWxk3C1oFgyXLDdUO70vPY1/H/bEldoRxM//BDDkpv+RU0slZn?= =?us-ascii?Q?UMXGUGDyow3nlZ2I1gCDOBx4WtAnzIm/8AevW+OTIp7mmGjFwCKB/qRtVonT?= =?us-ascii?Q?MToRX+Vgc9Ef4aw8tsfuaivSF6G7FKsSVftwxvui6QhZd4M+4OGyAPXSXHYH?= =?us-ascii?Q?WbmYKrjmmAXWtaR7hqPj3m+pD7iFydpoBG5k+1zuxA1JwH0NPT2GsgxfdGaZ?= =?us-ascii?Q?0/mTg/q9vAnZq9uGaUCYPjABaF2Wz1MZWZizxsAwfxoKsaLpaVy3VnR2SVov?= =?us-ascii?Q?uHXn0H9M1w=3D=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 046bdb25-9b92-4b9d-b8c5-08df5387b659 X-MS-Exchange-CrossTenant-AuthSource: BN9PR12MB5179.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2026 10:57:25.8007 (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: 4N8MC0/2gxnGj/y6+dNuW4Pr0Olcm0uIWYM89Z0DhOrat2DQlz3s7J4vzF9+7YvQQnQ5B4l956mceM0K6dRT4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7255 Hi Changwoo, On Sun, Dec 06, 2026 at 02:37:22PM +0900, Changwoo Min wrote: > BPF schedulers keep their per-task context in task local storage, or in > an arena allocation reached through it, and look it up in nearly every > callback. Each lookup is a bpf_task_storage_get() call. > > This series adds p->scx.bpf_priv, an opaque u64 that the task's scheduler > sets with scx_bpf_task_set_priv(), typically to an arena pointer to its > task context. Any BPF program, tracing programs included, reads it with a > plain load. The value belongs to the scheduler that owns the task, from > after ops.init_task() until ops.exit_task(), and the kernel clears it > after ops.exit_task(). The kfunc checks the ownership under the task's > locks. Like scx_bpf_cpuperf_set(), it can be called from an op called > for the task or with no lock held. > > With sub-schedulers, a task that a scheduler reaches may belong to > another scheduler. scx_bpf_sched_id() returns the calling scheduler's > id, which is never reused, and scx_task_sched_id() in compat.bpf.h the > id of the task's owner. A reader holding the task's locks compares the > two, and a lockless one tags the value with its id. > > - Patch 1 adds scx_bpf_sched_id() and scx_task_sched_id(). > - Patch 3 adds p->scx.bpf_priv and scx_bpf_task_set_priv(). > - Patch 4 converts scx_qmap as an example. > - Patches 2, 5 and 6 add selftests. > > The scx side uses the field in its shared task data library and in > scx_lavd: > > https://github.com/multics69/scx/tree/changwoo/taskc-caching > > scx_lavd without and with that branch was compared on a 2-socket AMD > EPYC 9R45 machine with 192 CPUs (SMT off), running 7.4-rc4. Under > sysbench OLTP against MariaDB, at a fixed request rate of 60% of the > saturation throughput, bpf_stats shows ops.select_cpu() 9% and > ops.running() 12% cheaper per call. The BPF programs of scx_lavd use > 6% less of the total CPU time. > > The other workloads were MariaDB at a fixed rate of 80% and with one > closed-loop connection per CPU, memcached under memtier, schbench, > stress-ng futex, fork and exec, kernel builds and rt-app. None got > worse. stress-ng futex throughput improved by 10% and the memtier p99 > latency by 12%. > > The series is based on sched_ext/for-next (31f4eeaf9b7b). I left a couple of comments, but none of them are blockers (same for the issues reported by sashiko I think), so for the whole series feel free to add my: Reviewed-by: Andrea Righi Thanks, -Andrea > > ChangeLog v2 -> v3: > - Address all the review comments from Tejun, Andrea and Sashiko. > - Drop "sched_ext: Reset task fields after ops.exit_task()", applied > as 82cd5232be43. > - Drop "sched_ext: Mark a task enabled before ops.enable()" (Tejun). > - The value belongs to the task's owner, from after ops.init_task() > until ops.exit_task(), and is cleared after ops.exit_task() (Tejun). > - scx_bpf_task_set_priv() checks the ownership under the task's locks, > like scx_bpf_cpuperf_set(), and tracing programs can't call it > (Tejun). Publish the value with smp_wmb() and WRITE_ONCE(). > - Replace the scx_bpf_task_sched_id() kfunc with the CO-RE helper > scx_task_sched_id() (Andrea), which reports 0 for an unowned task > (Tejun). Set the task state in one store, as the helper reads it. > - Document how a reader checks the owner: compare the ids under the > task's locks, or tag the value. > - scx_qmap: Clear the value in qmap_exit_task(), use it in > qmap_dump_task() (Tejun), and read it with scx_bpf_task_priv(). > - Selftests: Test the new lifetime, the locking rules and > ops.init_task() in sub-scheduler handoffs. Count only the test's own > tasks and work in a PID namespace (Tejun). Associate the syscall > programs with the scheduler, use SCHED_OTHER instead of SCHED_FIFO, > fix the skeleton leaks and SCX_EQ() double evaluations, check that > the ops and writes the tests depend on actually ran, and skip where > sub-schedulers aren't supported (Sashiko). > > ChangeLog v1 -> v2: > - Rename p->scx.bpf_data to p->scx.bpf_priv, scx_bpf_task_set_data() to > scx_bpf_task_set_priv() and the compat reader scx_bpf_task_data() to > scx_bpf_task_priv() (Andrea). > - Reset the task fields after ops.exit_task() instead of before it > (new patch 1). ops.exit_task() could set a value that reached the > next scheduler in a sub-scheduler handoff (reported by Andrea). > - Mark a task enabled before ops.enable() (new patch 2, suggested by > Andrea). scx_bpf_task_set_priv() now accepts only enabled tasks, > which drops v1's exception for ops.enable(). > - Add a selftest for the sub-scheduler handoffs (new patch 8). > > v1: https://lore.kernel.org/r/20261201054850.780664-1-changwoo@igalia.com > v2: https://lore.kernel.org/r/20261203045618.982539-1-changwoo@igalia.com > > Changwoo Min (6): > sched_ext: Add scx_bpf_sched_id() and scx_task_sched_id() > selftests/sched_ext: Test scx_bpf_sched_id() and scx_task_sched_id() > sched_ext: Add p->scx.bpf_priv for O(1) task context lookup > sched_ext: scx_qmap: Cache task_ctx in p->scx.bpf_priv > selftests/sched_ext: Test p->scx.bpf_priv across class changes > selftests/sched_ext: Test task field reset across sub-scheduler > handoffs > > include/linux/sched/ext.h | 11 + > kernel/sched/ext/ext.c | 111 +++++- > tools/sched_ext/include/scx/compat.bpf.h | 85 +++++ > tools/sched_ext/scx_qmap.bpf.c | 69 +++- > tools/testing/selftests/sched_ext/Makefile | 3 + > .../selftests/sched_ext/sched_id.bpf.c | 43 +++ > tools/testing/selftests/sched_ext/sched_id.c | 129 +++++++ > .../selftests/sched_ext/sub_handoff.bpf.c | 166 +++++++++ > .../testing/selftests/sched_ext/sub_handoff.c | 341 ++++++++++++++++++ > .../selftests/sched_ext/task_bpf_priv.bpf.c | 129 +++++++ > .../selftests/sched_ext/task_bpf_priv.c | 195 ++++++++++ > 11 files changed, 1276 insertions(+), 6 deletions(-) > create mode 100644 tools/testing/selftests/sched_ext/sched_id.bpf.c > create mode 100644 tools/testing/selftests/sched_ext/sched_id.c > create mode 100644 tools/testing/selftests/sched_ext/sub_handoff.bpf.c > create mode 100644 tools/testing/selftests/sched_ext/sub_handoff.c > create mode 100644 tools/testing/selftests/sched_ext/task_bpf_priv.bpf.c > create mode 100644 tools/testing/selftests/sched_ext/task_bpf_priv.c > > > base-commit: 31f4eeaf9b7bc78f210475a551e7d61840514c03 > -- > 2.56.1 >