Re: [PATCH RFC 5/7] selftests/sched: Add SCHED_DEADLINE bandwidth tests to kselftest

From: Juri Lelli

Date: Wed Mar 11 2026 - 09:23:33 EST


On 11/03/26 09:31, Christian Loehle wrote:
> On 3/6/26 16:10, Juri Lelli wrote:

...

> > + /* Start one cpuhog per CPU at max bandwidth */
> > + printf(" Starting %d cpuhog tasks at max bandwidth...\n", num_cpus);
> > +
> > + for (i = 0; i < num_cpus; i++) {
> > + pids[i] = dl_create_cpuhog(runtime_ns, deadline_ns, period_ns, 0);
> > + if (pids[i] < 0) {
> > + printf(" Task %d failed to start: %s\n",
> > + i + 1, strerror(errno));
> > + goto cleanup;
> > + }
> > + started++;
> > + }
>
> Would it be okay to just have one task per max-cap CPU to make this pass on HMP?
> Or something more sophisticated?
>

On HMP we should probably have max bandwidth hogs on big CPUs and then
scale runtime (bandwidth) considering smaller CPUs capacities. Cannot
quickly check atm, but that info (max cap per-CPU) is available
somewhere in sys or proc, is it?

Thanks,
Juri