mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] sched/fair: Feature to suppress Fair Server for NOHZ_FULL isolation
@ 2026-01-06  3:42 Aaron Tomlin
  2026-01-06  3:42 ` [RFC PATCH 1/1] sched/fair: Introduce RT_SUPPRESS_FAIR_SERVER to optimise " Aaron Tomlin
  2026-01-06  9:07 ` [RFC PATCH 0/1] sched/fair: Feature to suppress Fair Server for " Shrikanth Hegde
  0 siblings, 2 replies; 13+ messages in thread
From: Aaron Tomlin @ 2026-01-06  3:42 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
	rostedt, bsegall, mgorman, vschneid
  Cc: neelx, sean, mproche, linux-kernel

Hi Ingo, Peter, Juri, Vincent,

This patch introduces a new scheduler feature, RT_SUPPRESS_FAIR_SERVER,
designed to ensure strict NOHZ_FULL isolation for SCHED_FIFO workloads,
particularly in the presence of resident CFS tasks.

In strictly partitioned, latency-critical environments (such as High
Frequency Trading platforms) administrators frequently employ fully
adaptive-tick CPUs to execute pinned SCHED_FIFO workloads. The fundamental
requirement is "zero OS noise"; specifically, the scheduler clock-tick must
remain suppressed ("offloaded"), given that standard SCHED_FIFO semantics
dictate no forced preemption between tasks of identical priority.

However, the extant "Fair Server" (Deadline Server) architecture
compromises this isolation guarantee. At present, should a background
SCHED_OTHER task be enqueued, the scheduler initiates the Fair Server
(dl_server_start). As the Fair Server functions as a SCHED_DEADLINE entity,
its activation increments rq->dl.dl_nr_running.

This condition compels sched_can_stop_tick() to return false, thereby
restarting the periodic tick to enforce the server's runtime.
To address this, the patch introduces a new scheduler feature control,
RT_SUPPRESS_FAIR_SERVER.

When engaged, this modification amends enqueue_task_fair() to forego the
invocation of dl_server_start() if, and only if, the following conditions
are met:

	1. A Real-Time task (SCHED_FIFO/SCHED_RR) is currently in execution
	2. RT bandwidth enforcement (rt_bandwidth_enabled()) is inactive

By precluding the server's initiation, rq->dl.dl_nr_running is maintained
at zero. This permits the tick logic to defer to the standard SCHED_FIFO
protocol, thereby ensuring the tick remains suppressed.

Considerations: This serves as a precision instrument for specialised
contexts. It explicitly prioritises determinism over fairness. Whilst
enabled, queued CFS tasks shall endure total starvation until such time as
the RT task voluntarily yields. I believe this is acceptable for
partitioned architectures where housekeeping duties are allocated to
alternative cores; however, I have guarded this capability within
CONFIG_NO_HZ_FULL and a default-disabled feature flag to obviate the risk
of inadvertent starvation on general-purpose systems.

I welcome your thoughts on this approach.


Aaron Tomlin (1):
  sched/fair: Introduce RT_SUPPRESS_FAIR_SERVER to optimise NOHZ_FULL
    isolation

 kernel/sched/fair.c     | 19 ++++++++++++++++++-
 kernel/sched/features.h |  9 +++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-01-13 19:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-06  3:42 [RFC PATCH 0/1] sched/fair: Feature to suppress Fair Server for NOHZ_FULL isolation Aaron Tomlin
2026-01-06  3:42 ` [RFC PATCH 1/1] sched/fair: Introduce RT_SUPPRESS_FAIR_SERVER to optimise " Aaron Tomlin
2026-01-06  9:07 ` [RFC PATCH 0/1] sched/fair: Feature to suppress Fair Server for " Shrikanth Hegde
2026-01-06 14:49   ` Aaron Tomlin
2026-01-07  9:48     ` Juri Lelli
2026-01-07 10:26       ` Peter Zijlstra
2026-01-07 16:26         ` Aaron Tomlin
2026-01-13  1:43         ` Aaron Tomlin
2026-01-06 15:37   ` Valentin Schneider
2026-01-06 16:38     ` Daniel Vacek
2026-01-07 20:25       ` Aaron Tomlin
2026-01-09  9:21         ` Valentin Schneider
2026-01-13 19:15           ` Aaron Tomlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®