On 3/11/26 13:44, Christian Loehle wrote:
> On 3/11/26 13:23, Juri Lelli wrote:
>> 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?
>
> Yes it's here:
> /sys/devices/system/cpu/cpu0/cpu_capacity
>
> FWIW I've attached the two patches to get a pass out of arm64 HMP.
Wait nevermind, this isn't right, this would expect a 10 CPU system with
[1024, 128, 128, 128, 128, 128, 128, 128, 128, 128]
= 2176
would allow for 2 1024-equivalent hogs, but that is obviously wrong as
the capacity -> bandwidth calculation must be capped in practice by
only summing the k-highest-cap-CPUs if there's only k deadline-tasks.
Let me go and read how this is actually supposed to work.