[LTP] [PATCH v5 2/3] controllers/cpuacct: skip cpuacct_100_100 on small memory systems

Krzysztof Kozlowski krzysztof.kozlowski@canonical.com
Thu Sep 2 10:06:54 CEST 2021


On 01/09/2021 20:38, Petr Vorel wrote:
>> Hi!
>>> +check_limits()
>>> +{
>>> +	local tasksneeded=$((max * nbprocess + 100))
> 
>> We allready have some reserve for the system in the tst_get_free_pids()
>> so shouldn't this be just max * nbprocess ?
> 
> Yes:
> lib/tst_pid.c
> 
> /* Leave some available processes for the OS */
> #define PIDS_RESERVE 50
> 
> I suppose 50 is enough, but if 100 is experienced to be needed I'd update PIDS_RESERVE.

Indeed, it's a duplicated reserve now. Let's dtop 100 here and use
existing PIDS_RESERVE.

> 
> Also, because you introduced use of awk, I'd add TST_NEEDS_CMDS="awk". Or is it
> that common even on embedded systems that we don't bother?

Even though most of Busybox installations have awk, it might be still
missing in some specific setup, so TST_NEEDS_CMDS="awk" seems reasonable.

> 
> NOTE: all changes can be done during merge, we just need to agree on it.
> 
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
> Kind regards,
> Petr
> 



Best regards,
Krzysztof


More information about the ltp mailing list