[LTP] [PATCH v7] high_freq_hwp_cap_cppc.c: new test

Kubaj, Piotr piotr.kubaj@intel.com
Thu Apr 30 13:10:04 CEST 2026


2026-04-29 (水) の 07:53 +0000 に Andrea Cervesato さんは書きました:
> Hi Piotr,
> 
> I commented the wrong patch. Was v6, sorry. Let me complete the
> review
> here.
> 
> > +static void run(void)
> > +{
> > +	bool status = true;
> > +
> > +	for (int i = 0; i < nproc; i++) {
> > +		int online = 1;
> > +		char path[PATH_MAX];
> 
> This can stay out of the loop. `snprintf()` adds a string terminator
> so there's no issue with this.
Fixed.

> 
> > +		unsigned long long msr_highest_perf = 0,
> > sysfs_highest_perf = 0;
> > +
> > +		snprintf(path, sizeof(path),
> > "/sys/devices/system/cpu/cpu%d/online", i);
> > +		if (i)
> 
> I think I missed a part here. Did you double check if `i == 0`
> creates
> an issue while using SAFE_FILE_SCANF ? Please verify and eventually
> remove this check.
Yes, it's necessary. "online" is not available for cpu0, I think it's
assumed to be always online.

> 
> > +			SAFE_FILE_SCANF(path, "%d", &online);
> 
> Regards,
> --
> Andrea Cervesato
> SUSE QE Automation Engineer Linux
> andrea.cervesato@suse.com
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.


More information about the ltp mailing list