Re: [PATCH v3 07/16] selftests/resctrl: Cleanup bm_pid and ppid usage & limit scope

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ilpo,

On 4/8/2024 9:32 AM, Ilpo Järvinen wrote:
> 'bm_pid' and 'ppid' are global variables. As they are used by different
> processes and in signal handler, they cannot be entirely converted into
> local variables.
> 
> The scope of those variables can still be reduced into resctrl_val.c
> only. As PARENT_EXIT() macro is using 'ppid', make it a function in
> resctrl_val.c and pass ppid to it as an argument because it is easier
> to understand than using the global variable directly.
> 
> Pass 'bm_pid' into measure_val() instead of relying on the global
> variable which helps to make the call signatures of measure_val() and
> measure_llc_resctrl() more similar to each other.

nitpick: measure_val() -> measure_vals()  (two instances above and
also in the changelog of next patch)

> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> ---

Reinette




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux