From nobody Mon Feb 9 01:20:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1682968898; cv=none; d=zohomail.com; s=zohoarc; b=lK8drcLOMpAzBI45P42Px/Y5hiizWpALk6UEeQvu/jGBRYQxyjyUx9tKrQLi9DEKNsD7Bv0NANGlj4oxrZwOpi2vmS7XdWPCTU3WPGjlS7FenBA8znyc/XLFwH/tmUaopahdJDXlIzXtk2TnKLLAW/ilHAqaVqlPgZPsp5sjpZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682968898; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hA8U/InM9EEJxsTtEJ4pQE8Dle8MV2Sm7m6DjaGLFBw=; b=LYn2LB54UjOqBMnkTblZVLJNLH5fLhgouK8RsOpiwJzzlytYmEY1HMLTJkz92WSI3uZIxXReA5Bh7+A+t5pN9Ks6qK6fcRC4ROvzbYy3p5IkxYmfaAq7p0jRjP9O0tsmkgEsa9bFQWrRZVfJZAaz1QEoCcrTWpluVCgMTWNuNGQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 168296889865974.15311186325482; Mon, 1 May 2023 12:21:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.528066.820656 (Exim 4.92) (envelope-from ) id 1ptZ5L-0004K9-Ej; Mon, 01 May 2023 19:21:19 +0000 Received: by outflank-mailman (output) from mailman id 528066.820656; Mon, 01 May 2023 19:21:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ptZ5L-0004Jy-Bi; Mon, 01 May 2023 19:21:19 +0000 Received: by outflank-mailman (input) for mailman id 528066; Mon, 01 May 2023 19:21:18 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ptZ5J-0003yM-Vk for xen-devel@lists.xenproject.org; Mon, 01 May 2023 19:21:17 +0000 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [2607:f8b0:4864:20::732]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 57a16940-e855-11ed-8611-37d641c3527e; Mon, 01 May 2023 21:21:16 +0200 (CEST) Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-74cebbb7bc5so275654785a.3 for ; Mon, 01 May 2023 12:21:16 -0700 (PDT) Received: from pm2-ws13.praxislan02.com (207-172-141-204.s8906.c3-0.slvr-cbr1.lnh-slvr.md.cable.rcncustomer.com. [207.172.141.204]) by smtp.gmail.com with ESMTPSA id x20-20020a0ce0d4000000b0061927ddb043sm2012307qvk.80.2023.05.01.12.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:21:14 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 57a16940-e855-11ed-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682968875; x=1685560875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hA8U/InM9EEJxsTtEJ4pQE8Dle8MV2Sm7m6DjaGLFBw=; b=alyW1WnDxf9gWpn/iywDsDjWYtiNrb58353i+DD9++Cpa7YDvVl5EOnhjOr7qgZ6B0 RWo7oakWLr32hdtu25e0yXhddgGem81Abc9u1tiXk5BSZKu9Wn4LnZnWqohDt7U0OIRP 1Vwij9eGmo0DPTDjtZAwVPzsmENXo5NCzFBn/pjPxkfGWiKoaKf2iMk1WNC0jNaA7qWV 5fkIkwLkHB2hIGp6CrRnnNLwyp+Sw/3+BpQifdRz+2gZsR4C4IEGgAwG74R7Qe73+Joe 6nZzkXBWog45V7Zpne/TjUOKDbRKSCzjxi67JcYxqhIWy/iklXt+xS1d0TB15rJvRp0s 7//A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682968875; x=1685560875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hA8U/InM9EEJxsTtEJ4pQE8Dle8MV2Sm7m6DjaGLFBw=; b=TV5WbagDmYG46TWa0zSQzYbBrHe77J89qcyOIBUz0gUDwJktRj9fNkg5SHYC5b7a0Q TtaRRqW2TtQ58O0ffKPQAVeasdCM93z4H9EOtUIRLxxHgpDFDbvvYWURkhYTiI86FvAb tt6SnTSa0oPWgp5yCD/0qObyhzYT/i3dCyKL6FlEqGHkrczypp8M91JyYpn9Ac7PQDyQ TVUezSWCS73RjRt/GK2Wi9bSbQ0nLvUjyx9rLkuzsuH1KOlVh7/1GV+T0KE7ap3w2o5G 1SXPdD5wh/0JGamIYlzogbnmWs0D2w9R6vmdZZE+h9u4obiAbsA3Fvu2C12X7GlCVTt4 SVBg== X-Gm-Message-State: AC+VfDx9ah8A7JlM4jEGXY8MXpgaz980oA3gO4S4uDmAgGUqJEdSFAu3 uEwnBK6uzL5rLubheIVipRQ= X-Google-Smtp-Source: ACHHUZ7Si1N+KuQIyeuzpeF6TE80Hpb0MgsDrxMePO6KWSxcK6U33V2aUW4c9/8oenuaGAK3spl/eQ== X-Received: by 2002:a05:6214:2a49:b0:5f5:51c4:fca5 with SMTP id jf9-20020a0562142a4900b005f551c4fca5mr1614591qvb.49.1682968875262; Mon, 01 May 2023 12:21:15 -0700 (PDT) From: Jason Andryuk To: xen-devel@lists.xenproj, xen-devel@lists.xenproject.org Cc: Jason Andryuk , Wei Liu , Anthony PERARD Subject: [PATCH v3 05/14] xenpm: Change get-cpufreq-para output for internal Date: Mon, 1 May 2023 15:20:36 -0400 Message-Id: <20230501192045.87377-6-jandryuk@gmail.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230501192045.87377-1-jandryuk@gmail.com> References: <20230501192045.87377-1-jandryuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1682968899359100001 Content-Type: text/plain; charset="utf-8" When using HWP, some of the returned data is not applicable. In that case, we should just omit it to avoid confusing the user. So switch to printing the base and turbo frequencies since those are relevant to HWP. Similarly, stop printing the CPU frequencies since those do not apply. Signed-off-by: Jason Andryuk --- v2: Use full governor name XEN_HWP_GOVERNOR to change output Style fixes --- tools/misc/xenpm.c | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c index 1bb6187e56..ce8d7644d0 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_cp= ufreq) { + bool internal =3D strstr(p_cpufreq->scaling_governor, XEN_HWP_GOVERNOR= ); int i; =20 printf("cpu id : %d\n", cpuid); @@ -720,10 +721,15 @@ static void print_cpufreq_para(int cpuid, struct xc_g= et_cpufreq_para *p_cpufreq) printf(" %d", p_cpufreq->affected_cpus[i]); printf("\n"); =20 - printf("cpuinfo frequency : max [%u] min [%u] cur [%u]\n", - p_cpufreq->cpuinfo_max_freq, - p_cpufreq->cpuinfo_min_freq, - p_cpufreq->cpuinfo_cur_freq); + if ( internal ) + printf("cpuinfo frequency : base [%u] turbo [%u]\n", + p_cpufreq->cpuinfo_min_freq, + p_cpufreq->cpuinfo_max_freq); + else + printf("cpuinfo frequency : max [%u] min [%u] cur [%u]\n", + p_cpufreq->cpuinfo_max_freq, + p_cpufreq->cpuinfo_min_freq, + p_cpufreq->cpuinfo_cur_freq); =20 printf("scaling_driver : %s\n", p_cpufreq->scaling_driver); =20 @@ -750,19 +756,22 @@ static void print_cpufreq_para(int cpuid, struct xc_g= et_cpufreq_para *p_cpufreq) p_cpufreq->u.ondemand.up_threshold); } =20 - printf("scaling_avail_freq :"); - for ( i =3D 0; i < p_cpufreq->freq_num; i++ ) - if ( p_cpufreq->scaling_available_frequencies[i] =3D=3D - p_cpufreq->scaling_cur_freq ) - printf(" *%d", p_cpufreq->scaling_available_frequencies[i]); - else - printf(" %d", p_cpufreq->scaling_available_frequencies[i]); - printf("\n"); + if ( !internal ) + { + printf("scaling_avail_freq :"); + for ( i =3D 0; i < p_cpufreq->freq_num; i++ ) + if ( p_cpufreq->scaling_available_frequencies[i] =3D=3D + p_cpufreq->scaling_cur_freq ) + printf(" *%d", p_cpufreq->scaling_available_frequencies[i]= ); + else + printf(" %d", p_cpufreq->scaling_available_frequencies[i]); + printf("\n"); =20 - printf("scaling frequency : max [%u] min [%u] cur [%u]\n", - p_cpufreq->scaling_max_freq, - p_cpufreq->scaling_min_freq, - p_cpufreq->scaling_cur_freq); + printf("scaling frequency : max [%u] min [%u] cur [%u]\n", + p_cpufreq->scaling_max_freq, + p_cpufreq->scaling_min_freq, + p_cpufreq->scaling_cur_freq); + } =20 printf("turbo mode : %s\n", p_cpufreq->turbo_enabled ? "enabled" : "disabled or n/a"); --=20 2.40.0