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

Re: [PATCH v7 11/15] xenpm: Print HWP/CPPC parameters


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 27 Jul 2023 12:32:01 +0100
  • Authentication-results: esa1.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 11:32:14 +0000
  • Ironport-data: A9a23:bdqBCapBL9T69rjhw0tpkFD0ZGNeBmIxZRIvgKrLsJaIsI4StFCzt garIBmHOPaJZWuneN93O9m3oB9Q6JLSmN9jHVdo+S4xFC1G8ZuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKq04GpwUmAWP6gR5weBzSZNVfrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXADsqQB2YrPjo+YLhbtNsi99/KIrLPZxK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFOUslWcOSA3xETdxVRrk6VoqwmpXDe1gVr3JDmMcbPe8zMTsJQ9qqdj jufrzynX0xEa7RzzxLd0WKI2fHguh/2Z5BNKeKA0vVVm1GMkzl75Bo+CgLg/KjRZlSFc9BWL UAO6zcthac3/U2vCNL6WnWQsHOC+xIRRddUO+k78x2WjLrZ5R6DAWoJRSIHb8Yp3OcpQRQ62 1nPmMnmbRRturCITXOW9p+PsCi/fyMSKAcqbDcJVwIf7/H/oYs4iVTESdMLLUKupoSrQ3eqm WnM9XVgwexJ1qbnyplX43jMpByhvbPTEDcFvCHtXm++sgc6RI+6MtnABUfg0RpQEGqIZgDf7 SBfypPOtLxm4YKlz3LUHrhUdF29z7PcaWCH3wYyd3U03271k0NPa7y8992XyK1BFs8fMQHkb 0bI0e+6zM8CZSD6BUObjm/YNijL8UQDPY6/PhwsRoASCqWdjSfelM2UWWae3nr2jG8nmrwlN JGQfK6EVChLUf82kmDpFrxFjtfHIxzSI0uJG/gXKDz+j9KjiIO9E+9ZYDNikMhnhE97nOkl2 4kGbJbbo/mueOb/fjPW4eYuwaMidBAG6WTNg5UPLIare1M2cFzN/teNmdvNjaQ5xfUK/goJl 1nhMnJlJK3X3CKccljbNSg4M9sCn/9X9BoGAMDlBn7ws1BLXGplxP13m0cfFVX/yNFe8A==
  • Ironport-hdrordr: A9a23:3qOgE6F7Ybujv/+ApLqEw8eALOsnbusQ8zAXPiFKOHlom6mj/a 2TdZsguSMc5Ax/ZJhYo6H4BEDiewK/yXcW2+ks1N6ZNWHbUQ2TQr2KhrGSoAEIdReeygdr79 YFT0EvMrbN5IBB/L3HCdODYrAdKQS8gceVbDvlvg9QpN9RGttd0zs=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jul 26, 2023 at 01:09:41PM -0400, Jason Andryuk wrote:
> @@ -772,6 +812,32 @@ static void print_cpufreq_para(int cpuid, struct 
> xc_get_cpufreq_para *p_cpufreq)
>                 p_cpufreq->u.s.scaling_min_freq,
>                 p_cpufreq->u.s.scaling_cur_freq);
>      }
> +    else
> +    {

I feel like this could be confusing. In this function, we have both:
    if ( hwp ) { this; } else { that; }
and
    if ( !hwp ) { that; } else { this; }

If we could have the condition in the same order, or use the same
condition for both "true" blocks, that would be nice.


> +        const xc_cppc_para_t *cppc = &p_cpufreq->u.cppc_para;
> +
> +        printf("cppc variables       :\n");
> +        printf("  hardware limits    : lowest [%u] lowest nonlinear [%u]\n",
> +               cppc->lowest, cppc->lowest_nonlinear);

All these %u should be %"PRIu32", right? Even if the rest of the
function is bogus... and even if it's probably be a while before %PRIu32
is different from %u.

Thanks,

-- 
Anthony PERARD



 


Rackspace

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