From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5591BC388F7 for ; Wed, 21 Oct 2020 00:31:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8B1E22453 for ; Wed, 21 Oct 2020 00:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603240262; bh=DzjlTi+LMW7f0jw51e1zll+fYafR4cw5lmCy8byMjg0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=acyCZjO9i+2tYbxDQbyV0521SU7kk7y84XQ2UymRH0U7/vK0CN2dyuvQkyHYN5hfS 9pVsquRMqCfsb3pnBCh6v8oOCcYnL3AMqosdJnz2qyd926BrrDuNZQOAgRT9OZlUOu peYlHeU3DiM3b3zsXCU/zvKeLl1s1Kc7bUG9IsIg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410966AbgJUAbB (ORCPT ); Tue, 20 Oct 2020 20:31:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410955AbgJUAbA (ORCPT ); Tue, 20 Oct 2020 20:31:00 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CD4FC0613D3 for ; Tue, 20 Oct 2020 17:31:00 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id j7so218171oie.12 for ; Tue, 20 Oct 2020 17:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=t1EKIojvj5WfHRlPVYfUZgLO8UvuHDM907Gh4Q1FZ38=; b=MXjSs3lhS6z1iFAV6zWfAiL5uh9YnrlhA0aSjKjFXcCV/JfEUl4Y0vJHCM5dmCRiun qKvbGl/QruGROhwOT2l5s/6qWWtGPhXpT3prAHhcQP53xUQPazib9hlUid/yw9mnNvo9 KUzLP1bBHNsDeVbU2B66KklGPV3uSWX7rzODw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=t1EKIojvj5WfHRlPVYfUZgLO8UvuHDM907Gh4Q1FZ38=; b=Iw8ofoLIKguw6CN9AQH9o5oSDlsMAONuFcYIEwYi4TrMEg8f6PrCoUp1J7sKMfP3Ls RL3jJxdsO0h67rzhkLJN6kc1dNRf4ZAsFtTUy5xT+7gFvla+TCT+9K78an4/LOTY8kux f4Gs+Ncnq3S8G8ebgESYJ8kNP2lJ0jV9KVz0Dw3i2DRuXcz5tqYCpF/aeU4y8S2suOHU Dao4q3kcFfgiHXRJry8zuToT/QC6RUwjtRvBIpc7oPm+kOrzbgafvlYtvdb965KlGKXS a8U4iNaFda/hmzoJ359EACTSV1dsGGTZBssYucGbf5NQe2ZJLUQTYefNFF2pgtrxrLyK RNNA== X-Gm-Message-State: AOAM530v01EqvcT04YSwymcDIXfi4+ZE2gXKw+xAe5YdNvDhoUYwExST j+ATdhBlD5TDdeUDHZTHGGX7/A== X-Google-Smtp-Source: ABdhPJyIJvwjXZjkrNv0BidQDrCrJF8J+lBsjxwT/69HByYcuwLyN5zZXFWPgdv9KvwniUUig7e7+w== X-Received: by 2002:aca:5285:: with SMTP id g127mr413334oib.88.1603240259580; Tue, 20 Oct 2020 17:30:59 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id h24sm122361oov.35.2020.10.20.17.30.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Oct 2020 17:30:58 -0700 (PDT) Subject: Re: [PATCH v3] cpupower: Provide online and offline CPU information To: Brahadambal Srinivasan , shuah@kernel.org, trenn@suse.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, "Pavithra R . Prakash" , Shuah Khan References: <20201016085929.86252-1-latha@linux.vnet.ibm.com> From: Shuah Khan Message-ID: Date: Tue, 20 Oct 2020 18:30:57 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201016085929.86252-1-latha@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/16/20 2:59 AM, Brahadambal Srinivasan wrote: > When a user tries to modify cpuidle or cpufreq properties on offline > CPUs, the tool returns success (exit status 0) but also does not provide > any warning message regarding offline cpus that may have been specified > but left unchanged. In case of all or a few CPUs being offline, it can be > difficult to keep track of which CPUs didn't get the new frequency or idle > state set. Silent failures are difficult to keep track of when there are a > huge number of CPUs on which the action is performed. > This fllowing text shouldn't be part of the change log. This type of version to version change text is added between the --- and start of diff. > In v1 of this patch, I had sent tried to address this with repetitive code > in both cpufreq-set and cpuidle-set. V2 incorporated the review comments > and added helper functions to find both online and offline CPUs and print > them out accordingly. Correcting compile issues in v3. > > We use these helper functions in cpuidle-set and cpufreq-set to print an > additional message if the user attempts to modify offline cpus. > > Reported-by: Pavithra R. Prakash > Signed-off-by: Brahadambal Srinivasan > --- > tools/power/cpupower/utils/cpufreq-set.c | 3 + > tools/power/cpupower/utils/cpuidle-set.c | 4 ++ > tools/power/cpupower/utils/cpupower.c | 8 +++ > tools/power/cpupower/utils/helpers/helpers.h | 12 ++++ > tools/power/cpupower/utils/helpers/misc.c | 66 +++++++++++++++++++- > 5 files changed, 92 insertions(+), 1 deletion(-) > Add revision changes here. > diff --git a/tools/power/cpupower/utils/cpufreq-set.c b/tools/power/cpupower/utils/cpufreq-set.c > index 6ed82fba5aaa..f25cdfa05c5f 100644 > --- a/tools/power/cpupower/utils/cpufreq-set.c > +++ b/tools/power/cpupower/utils/cpufreq-set.c thanks, -- Shuah