|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v7 08/15] xenpm: Change get-cpufreq-para output for hwp
On Thu, Jul 27, 2023 at 12:00:54PM +0100, Anthony PERARD wrote:
> On Wed, Jul 26, 2023 at 01:09:38PM -0400, Jason Andryuk wrote:
> > diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c
> > index 1c474c3b59..21c93386de 100644
> > --- a/tools/misc/xenpm.c
> > +++ b/tools/misc/xenpm.c
> > @@ -711,6 +711,7 @@ void start_gather_func(int argc, char *argv[])
> > /* print out parameters about cpu frequency */
> > static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para
> > *p_cpufreq)
> > {
> > + bool hwp = strcmp(p_cpufreq->scaling_driver, XEN_HWP_DRIVER_NAME) == 0;
> > int i;
> >
> > printf("cpu id : %d\n", cpuid);
> > @@ -720,49 +721,57 @@ static void print_cpufreq_para(int cpuid, struct
> > xc_get_cpufreq_para *p_cpufreq)
> > printf("scaling_driver : %s\n", p_cpufreq->scaling_driver);
> >
> > + if ( !hwp )
>
> This test kind of feels wrong. Should we test instead the thing we want
> to print? Maybe declaring another bool, something like "bool
> scaling_governor = !hwp" just below the declaration of "bool hwp"?
> Otherwise, if there's another technology that comes along that isn't
> "hwp" and not something that can be printed with this, there's going to
> be some kind of hidden bug (even if probably easy to spot during
> development).
We agreed in patch 11 that this test would be temporary, and changed in
patch 11, so:
Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Thanks,
--
Anthony PERARD
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |