On 14.04.2025 09:40, Penny Zheng wrote: > In `xenpm start` command, the monitor of average frequency shall > not depend on the existence of legacy P-states, so removing "px_cap" > dependancy check.
Well, yes, I agree there. But can you explain to me what the file scope "avgfreq" is good for? Shouldn't we go farther and tidy things more thoroughly? Much like show_cpufreq_by_cpuid(), we could call get_avgfreq_by_cpuid() right before printing. (It escapes me altogether why start_gather_func() would pre-fill the array. Unlike cxstat_start[] and pxstat_start[] that's not incrementally or differentially used data.) Doing that would make yet more obvious that the px_cap part of the condition was bogus presumably from the very start. (I'm further inclined to say that this change should also have a Fixes: tag.) Jan