From nobody Sat Feb 7 22:06:45 2026 Received: from LO0P265CU003.outbound.protection.outlook.com (mail-uksouthazon11022082.outbound.protection.outlook.com [52.101.96.82]) (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 6AB452517B9 for ; Tue, 6 Jan 2026 03:42:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.96.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767670945; cv=fail; b=pXiX4DcJqIiag7wG6qqHyk4xyctshWCfPVmQQoIZLiXhJ6ofZYJxGICK/JKPCYQp6k5xynwM14FBGdDwgRDNIJmSbvHOvbGCPKpyjmLt5lLuOtfxurkuA+6ZhMLofrsQjerck8cLnBDdPqMsHclsD6/LfoMTtV0SD43rvN2EMow= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767670945; c=relaxed/simple; bh=/DiBxliFOai13c3PNGihvEbvVwSRCiHhdMhPSyjjGwA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=A7wooR1D81KgKpPpVMabg7+DoUT/iFrVLqIeZjujWepABtkvhIucU0Pl6kwO7hjwNCWO86B6M0IGx13U9RZ5OMq5HkcFCb5J6rj8bqjE4GOn5sDRRh2qZ/Jv1dq9m3v2ML9ZE4+Sd69W2VVk3tKlkMCqDTJjZM5jLyCV/JLUuGA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atomlin.com; spf=pass smtp.mailfrom=atomlin.com; arc=fail smtp.client-ip=52.101.96.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atomlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=atomlin.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DSB8BMk+NiQZXcFYBEtipyPeXKnsL+jFcVPbBTs8k90j3BuWvpLCbtUQNYyMQsM4KhNSsEZ/EPiZhqQHcusOEZyD4vyiHCZgWCO899l/ExVPMYVDaeC//RvYKMKQFpxpaJXV0dERSCSwAmUZ4Y2v9MLiDvQmI4Ax2Iwpw5XPM9cd9INA+AXGx2WCF8GTnS3wr1VZ2wQHmT4wD6BGevwTwTEqTR53q69As3ptSOjO62oR8eaWYP5lL3HoCfjj9W/oAhNRonJQLTFj5El/bbJbgzPKHItM6FWdwrv4CS1e0TcycNyYgoKybMtqQcQiki3IaLfPpQ6MC/+TtdMCdvErgw== 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=OMYD67MqIo8wseTGTkPJ5ZFOl8MsuS6LRzhsKkSteJo=; b=xQfWjnosGWUO0VSwL5RiGq81u1FiW7Q+aYDPE2A2cTLsxb9I/FsVL5E3QuSCOmBE1GKtpgsMW4aTEAFWBl9UyWWmcpnsEeXEW9AbFfTO9N+NP39o8tVWRliyMDWEsuGDRpgVifre20kem268qT1vGZG53i739P5DULPxfwjDdOMeoC6a5865MgOggpQ1Mrgnlaj/A1ifGY6sv86p4qkZ8XpAkvJnSH7fre9DQ7QLK9lCLC5LBKdjPTqmEzTTCQf4Q/aT9xbLZS+jHEuJPdcYpZfEXHA96wze3Z4XVRyEJjR6tQpHreNwPFNr5v7X7sbVLb8bsYNUK9BcHnevu5sgmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=atomlin.com; dmarc=pass action=none header.from=atomlin.com; dkim=pass header.d=atomlin.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=atomlin.com; Received: from CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:70::10) by CWLP123MB6443.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:1d1::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9478.5; Tue, 6 Jan 2026 03:42:21 +0000 Received: from CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM ([fe80::de8e:2e4f:6c6:f3bf]) by CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM ([fe80::de8e:2e4f:6c6:f3bf%5]) with mapi id 15.20.9478.005; Tue, 6 Jan 2026 03:42:20 +0000 From: Aaron Tomlin To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com Cc: neelx@suse.com, sean@ashe.io, mproche@gmail.com, linux-kernel@vger.kernel.org Subject: [RFC PATCH 1/1] sched/fair: Introduce RT_SUPPRESS_FAIR_SERVER to optimise NOHZ_FULL isolation Date: Mon, 5 Jan 2026 22:42:08 -0500 Message-ID: <20260106034209.2703289-2-atomlin@atomlin.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260106034209.2703289-1-atomlin@atomlin.com> References: <20260106034209.2703289-1-atomlin@atomlin.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: BN9PR03CA0697.namprd03.prod.outlook.com (2603:10b6:408:ef::12) To CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM (2603:10a6:400:70::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CWLP123MB3523:EE_|CWLP123MB6443:EE_ X-MS-Office365-Filtering-Correlation-Id: 15d54920-71f0-45b8-0519-08de4cd598b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|7416014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?fm14UNY6tZgifMZLMMI8EGb8/1UkfsQwH+c+N/NtWd3M6DPhGmLZazNORTjy?= =?us-ascii?Q?BgURtp7R+rPL5tdaD6JqtuY6flqF20IHwNCMyhia4ZfBjaiIAgwgcPho72Y/?= =?us-ascii?Q?4tPb4dUkgwYWy/iZRvVllJpzAvHYfS6tucmtBX4eKdSFnRVmdbKFHdSAGgvX?= =?us-ascii?Q?m39874gd4YAy4q88Drdc986BbZGjhbmqSkgqaMIwfjK5mjd5maDFWxcqB+L+?= =?us-ascii?Q?P76bQgzaLiHYps1Rd3GHJwp2y8mkRY7zsGbdy8TngIpbIBFOiVPRzB3y9elW?= =?us-ascii?Q?4JUe1BmIh8uwKyaoVIrigOOfKIz+7tP23MJrqRxcPQihFT1YUjOujvyNW6XT?= =?us-ascii?Q?swE26Pgj38/KEa7p3ij3V27DpISHhiPigFjxeTS7QYlXpoOllF/Cf/BVIrED?= =?us-ascii?Q?YM3DN7BLDaN68wQSnppbGIymIGDdOjsW4XKDsB71G7pjuQ171BDZ/DqCuV8n?= =?us-ascii?Q?rttQeKqBR+ks7RNYLo+2A4JO3yVnAn82vjKAaiiqVVcdBv6HjQ10dusOopWa?= =?us-ascii?Q?nJrZC6KJnu4dUWnbaeElinF/MUQSGfWv6zYFGevn2GnmiaFO7Tjkh+EW6HcI?= =?us-ascii?Q?Is4Zz0iQ8dPGokxGul6uGoNyQUZYhSggLYFau3Xo4Nb4EJ8II3VlEi8dzn6j?= =?us-ascii?Q?ltwIbrtoJbiLT4LUBy0qgu+1VX6wg54tT7Vn+eypFF/Yo5pJlIfwOmJbGbBn?= =?us-ascii?Q?u718pikr+MtdJA1KZGMWvBiUAbpHnZwe7KPUsUGvxkXzimVQj28vexYnyq3g?= =?us-ascii?Q?gOwkOeELZVfgbJ1A8fIKHe519iXLoUIgY5FJNS5CKGmo10ImZpLrZmlXJ6mm?= =?us-ascii?Q?AxHTM40DwU/wb1vTPwYWQ0OHHMp06gf5ezkQvqgUxN5Gs4E//pGPyVsqKLCG?= =?us-ascii?Q?N+ExfeR1dh+wHPrl2Bwjz6qXoPGc5C/O/3llqHBHKix2H4HsyXuqOIQSfHlU?= =?us-ascii?Q?K9ZG7SsOBKGSjVAw7NW5ttq1lHmEyh5Eaol/4a0Q76cqrUxk0AJbc7n1nMyo?= =?us-ascii?Q?eYp1lvvtCC6gk0fWSZnoHRvpixPipcBgnQ0gpIP9KqIQKYGuGBKosDvusuCf?= =?us-ascii?Q?qD9W9v60GGB8YofBy2nZOfteqe7+/pOtJXe4EmtupbIbnFZFTpHlz+YbSt4l?= =?us-ascii?Q?2C6PKy1fU608e8fKFr5LeCDb0EsgHO/Ckm1fO2I/YDG4faRiciQ3Yi4N3//B?= =?us-ascii?Q?kHQNaMckf5grZ9gQq775h/i2EwTvBYWpA0AU1eR4QMdSBiaqCdFOJxlTLXN0?= =?us-ascii?Q?GLOr9y26u1a+5U4h05nU7TSz2N459CObmPfsYKCYeeWgTRhB0wSEefchOCDV?= =?us-ascii?Q?XnuBy+MiTbtob9DDUb2E49jYtYpaTqykRrMppn6m+IhShblwAuuzKZuZh7Rb?= =?us-ascii?Q?YIDUaVm/MRH3H+M56f9AwZp0IkT8H+2OO7T2M7GRgo4gOLqIIghwTyF4ZlXH?= =?us-ascii?Q?8TRwOQ5uikptmGOqw/V6Iel1upY22c+8?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(7416014)(1800799024);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Rv/UvYZOnsIM+vd6Ddn7kXcI6UfVdILuWCu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rossTenant-Network-Message-Id: 15d54920-71f0-45b8-0519-08de4cd598b9 X-MS-Exchange-CrossTenant-AuthSource: CWLP123MB3523.GBRP123.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2026 03:42:20.9547 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e6a32402-7d7b-4830-9a2b-76945bbbcb57 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6BHHDBg9NGuA+qqhOj8jKxIw3UJA+nIlgbZQym0lZeQOciisFPWngtAfoCK6hw9UeFjcTPej0zZhJMnHjHB3Cg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CWLP123MB6443 Content-Type: text/plain; charset="utf-8" In strictly partitioned, latency-critical environments, such as High Frequency Trading (HFT) platforms, CPUs are frequently configured in fully adaptive-tick mode to execute specific SCHED_FIFO workloads. The paramount design objective in these scenarios is the elimination of all sources of jitter, with particular emphasis on suppressing the clock-tick. However, recent architectural amendments regarding bandwidth control introduced the "Fair Server" (or DL Server) - a proxy SCHED_DEADLINE entity designed to preserve bandwidth for SCHED_OTHER (CFS) tasks. Currently, when a CFS task enqueues on a CPU, enqueue_task_fair() invokes dl_server_start(). Crucially, this action increments rq->dl.dl_nr_running, forcing sched_can_stop_tick() to return false and immediately restarting the periodic tick. This behaviour prioritises fairness over the absolute isolation necessitated by real-time workloads. To address this, I propose the introduction of a new scheduling feature, RT_SUPPRESS_FAIR_SERVER, guarded by CONFIG_NO_HZ_FULL. When this feature is engaged - provided that RT bandwidth enforcement is inactive and a real-time task is in execution - the scheduler foregoes the invocation of dl_server_start() within enqueue_task_fair(). Consequently: 1. The Fair Server remains inactive (rq->dl.dl_nr_running is not incremented) 2. The tick accounting logic in sched_can_stop_tick() defers to the standard SCHED_FIFO checks 3. The tick remains suppressed, preserving the "Run until Block" isolation guarantee for the active real-time task It must be noted that enabling this feature explicitly compromises general purpose system fairness in favour of determinism. - Starvation: Any queued CFS tasks shall endure total starvation until such time as the RT task voluntarily yields (blocks, sleeps, or terminates); they will not be preempted via the server mechanism - Accounting: Load tracking metrics (PELT) for queued CFS entities may effectively freeze or suffer inaccuracies, as the tick is ordinarily required to update these statistics during contention To maintain standard safety and fairness guarantees on general purpose systems, this feature is disabled by default. Signed-off-by: Aaron Tomlin --- kernel/sched/fair.c | 19 ++++++++++++++++++- kernel/sched/features.h | 9 +++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index da46c3164537..68a8011146c5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6962,8 +6962,25 @@ enqueue_task_fair(struct rq *rq, struct task_struct = *p, int flags) h_nr_idle =3D 1; } =20 - if (!rq_h_nr_queued && rq->cfs.h_nr_queued) + if (!rq_h_nr_queued && rq->cfs.h_nr_queued) { +#ifdef CONFIG_NO_HZ_FULL + /* + * Normally, we start the Fair Server to ensure CFS + * bandwidth enforcement. However, if the + * RT_SUPPRESS_FAIR_SERVER feature is enabled and RT + * bandwidth throttling is disabled, we skip starting the + * server when an RT task is running. This prevents the + * server (a Deadline entity) from forcing the tick active, + * thereby preserving NOHZ_FULL isolation. + */ + if (likely(!sched_feat(RT_SUPPRESS_FAIR_SERVER) || + rt_bandwidth_enabled() || + !rt_task(rq->curr))) + dl_server_start(&rq->fair_server); +#else dl_server_start(&rq->fair_server); +#endif + } =20 /* At this point se is NULL and we are at root level*/ add_nr_running(rq, 1); diff --git a/kernel/sched/features.h b/kernel/sched/features.h index 980d92bab8ab..feb7cae9ce75 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -108,6 +108,15 @@ SCHED_FEAT(RT_PUSH_IPI, true) #endif =20 SCHED_FEAT(RT_RUNTIME_SHARE, false) +#ifdef CONFIG_NO_HZ_FULL +/* + * Suppress Fair Server activation for SCHED_FIFO/RR tasks on + * NOHZ_FULL CPUs. This prevents the tick from being restarted for + * background CFS maintenance, prioritising deterministic RT + * execution over CFS fairness. + */ +SCHED_FEAT(RT_SUPPRESS_FAIR_SERVER, false) +#endif SCHED_FEAT(LB_MIN, false) SCHED_FEAT(ATTACH_AGE_LOAD, true) =20 --=20 2.51.0