Skip to content

NVIDIA: SAUCE: sched/deadline: Skip DL server initialization on nohz_full CPUs#400

Closed
kobak2026 wants to merge 1 commit into
NVIDIA:24.04_linux-nvidia-6.17-nextfrom
kobak2026:fix/nohz-full-disable-dl-server
Closed

NVIDIA: SAUCE: sched/deadline: Skip DL server initialization on nohz_full CPUs#400
kobak2026 wants to merge 1 commit into
NVIDIA:24.04_linux-nvidia-6.17-nextfrom
kobak2026:fix/nohz-full-disable-dl-server

Conversation

@kobak2026
Copy link
Copy Markdown
Collaborator

@kobak2026 kobak2026 commented Apr 29, 2026

[issue description]

The DL scheduler server (fair_server) is initialized on every online CPU with the default 50ms/1000ms bandwidth. On nohz_full isolated CPUs, its dl_task_timer hrtimer fires periodically and reactivates the scheduler tick before the IRQ-exit path can suppress it. The result is that isolated CPUs can run the scheduler tick at full HZ rate.

This regresses from v6.8, where the DL server did not exist and nohz_full CPUs had no matching spurious hrtimer activity.

[how to reproduce]

Use the osnoise testing procedure:

echo 0-60 | sudo tee /sys/kernel/tracing/osnoise/cpus
echo 1000000 | sudo tee /sys/kernel/tracing/osnoise/period_us
echo 1000000 | sudo tee /sys/kernel/tracing/osnoise/runtime_us
echo 0 | sudo cat /sys/kernel/tracing/osnoise/stop_tracing_total_us
echo 0 | sudo cat /sys/kernel/tracing/osnoise/stop_tracing_us
#Run osnoise tracer for 30min, stop osnoise tracer, run cyclictest for 30min, stop cyclictest
echo osnoise | sudo tee /sys/kernel/tracing/current_tracer
sleep 10
sudo cp /sys/kernel/tracing/trace osnoise.txt
echo nop | sudo tee /sys/kernel/tracing/current_tracer

Observed before this fix:

IRQ=~1000/s SIRQ=~30/s on isolated CPUs

Observed after this fix:

IRQ=0 SIRQ=0 on isolated CPUs (100.00000% CPU availability)

The validation was repeated across 6 reboot cycles.

[how to fix]

Skip DL server initialization for CPUs covered by tick_nohz_full_cpu(cpu). These CPUs are isolated and do not need CFS bandwidth protection from the DL server.

Fixes: bd9bbc9 ("sched: Rework dl_server")

@kobak2026 kobak2026 changed the title fix/nohz full disable dl server NVIDIA: SAUCE: sched/deadline: Skip DL server initialization on nohz_full CPUs Apr 29, 2026
@nvmochs
Copy link
Copy Markdown
Collaborator

nvmochs commented Apr 29, 2026

@kobak2026 What are the upstream plans for this patch? In general we should be pursuing upstream-first and then backporting to our kernels.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ❌ Errors found

Details
Checking 1 commits...

Cherry-pick digest:
┌──────────────┬───────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject           │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ f7c99286f2b7 │ [SAUCE] sched/deadline: skip dl server initia │ N/A        │ N/A     │ kobak                     │
└──────────────┴───────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

PR metadata:
W: PR title missing [<branch>] prefix: "NVIDIA: SAUCE: sched/deadline: Skip DL server initialization on nohz_full CPUs"
E: PR targets 24.04_linux-nvidia-6.17-next but body has no 'BugLink:' or 'LP:' https://bugs.launchpad.net/... line

@kobak2026 kobak2026 requested a review from arighi April 29, 2026 01:50
@kobak2026
Copy link
Copy Markdown
Collaborator Author

kobak2026 commented Apr 29, 2026

@kobak2026 What are the upstream plans for this patch? In general we should be pursuing upstream-first and then backporting to our kernels.

@nvmochs okay, I will upstream today

…full CPUs

The DL scheduler server (fair_server) is initialized on every online CPU
with a default runtime of 50ms/1000ms. On nohz_full isolated CPUs, the
DL server's dl_task_timer hrtimer fires periodically, which triggers
hrtimer_interrupt(). This re-activates the tick's sched_timer (via
tick_nohz_handler returning HRTIMER_RESTART) before the IRQ-exit path
can suppress it through tick_nohz_full_update_tick(), causing the
scheduler tick to run at full HZ rate on isolated CPUs.

This is a regression from v6.8 where the DL server did not exist and
nohz_full CPUs had no spurious hrtimer activity.

Measured with osnoise tracer on ARM64 (nohz_full=4-64):
  Before: IRQ=~1000/s SIRQ=~30/s on isolated CPUs
  After:  IRQ=0       SIRQ=0     on isolated CPUs (100.00000%)

Verified across 6 reboot cycles with the osnoise method (CPUs 0-60,
10s runtime) - all isolated CPUs consistently at 100.00000% CPU
availability.

Skip DL server initialization for nohz_full CPUs since they are
isolated and do not need CFS bandwidth protection.

Fixes: bd9bbc9 ("sched: Rework dl_server")
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Koba Ko <kobak@nvidia.com>
@kobak2026 kobak2026 force-pushed the fix/nohz-full-disable-dl-server branch from cfd7e6c to f7c9928 Compare April 29, 2026 03:39
@nvmochs
Copy link
Copy Markdown
Collaborator

nvmochs commented Apr 29, 2026

Discussed with Koba, this is still WIP, moving PR to draft mode for now.

@nvmochs nvmochs marked this pull request as draft April 29, 2026 13:50
@kobak2026 kobak2026 closed this Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants