[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


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 27 Jul 2023 16:13:04 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Thu, 27 Jul 2023 15:13:21 +0000
  • Ironport-data: A9a23:2WvXxKxJz9bK3nnTuQ96t+cYxirEfRIJ4+MujC+fZmUNrF6WrkUDn TZODGrTbPrcajf2c4p3Oo7k9ElTvMfRyoIwG1M4pCAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8EoHUMja4mtC5QRhP68T5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KXpF9 tMHFBcGVDCai8+XwaiAE8UrhMt2eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyMlKZOUYn1lQ/UfrSmM+hgGX/dDtJ7kqYv6Mt70DYzRBr0airO93QEjCPbZwMwB3F+ DiXpAwVBDkdKPnYwzWn6k6cxdfGmQLnVr9VLJC3o6sCbFq7mTVIVUx+uUGAifuwjEKkSs9cA 0MR8ysq66M18SSDXtT7GhG1vnOAlhodQMZLVf037hmXzajZ6BrfAXILJhZebPQ2uclwQiYlv neLld70AT1ksJWOVGmQsLyTqFuaMDAYN2YYaQcYTAEO5J/op4Rbs/7UZo89Sujv1ISzQGyuh WnQ90DSmon/k+YQ3KaU4mzgiAiMv5Tkbw8v3Vz7GWCqu1YRiJGeW2C41bTKxa8efd7CHwLR5 CRsd9u2t75XU8zU/MCZaKBURezyua7YWNHJqQQ3d6TN4QhB7JJKkWp4xDhlbHlkPc8fEdMCS B+C4FgBjHO/0ZbDUEOWX25SI55wpUQYPY65Ps04l/IXCnSLSCeJ/Tt1eWmb1H33nU4nnMkXY MnKKZ39UyxFWP8/k1JaotvxN5dxmEjSIkuKG/jGI+mPi+LCNBZ5t59bWLdxUgzJxPzd+1iEm zquH8CL1w9eQIXDjtr/qOYuwaQxBSFjX/je8pUHHtNv1yI6QAnN/deNm+J+E2Gk9owJ/tr1E oaVBh4DkAWn2SKvxMfjQikLVY4DlK1X9RoTVRHA937ys5T/Se5DNJsiSqY=
  • Ironport-hdrordr: A9a23:cif+ZKOAkUhtacBcTvijsMiBIKoaSvp037BL7TEJdfUxSKalfq +V7ZEmPHPP+VQssTQb6LO90cq7IE80l6QFhbX5VI3KNGLbUSmTTL2KhrGSpAEIdReOkNK1Fp 0NT0G9MrDN5JRB4voSKTPXL+od
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.