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=unavailable 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 21C25C4363D 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 B30A52244C 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=1603240261; bh=DzjlTi+LMW7f0jw51e1zll+fYafR4cw5lmCy8byMjg0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=1TBloxA20vkGJAeu70N3xIMzMbhdi70VGY6rkAy41+mK711YJZ76y9heR/lAkPnXD WwKGFVpixmpEHDZjdCvBllfAJ5hEA6b+/rKfnHXOVvCao/zXufp5EgFsNlAYCB1JwD DLec5N4/iJFr/fNGXHOFtVoplyODCKTpMQ0n+g18= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410956AbgJUAbA (ORCPT ); Tue, 20 Oct 2020 20:31:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2410953AbgJUAbA (ORCPT ); Tue, 20 Oct 2020 20:31:00 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56DA9C0613CE for ; Tue, 20 Oct 2020 17:31:00 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id q136so242424oic.8 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=hyqOMM4JfJJAyvi/kO1VVokvs9AuZ792szJPYg4YMPi2Cjrkn5ay1YXk/s/CEXF+wa yOJjp+kIDtfZT/a62qHC+F+P5+KRo0qUvtUARqyGbhLgPOIRAiKWYqHx4LMLHHFjvbGC zs1Z5XI/A+UWdBVcjm98S/w+oSBHVAbN9oV3JHsVqtBsjZYhp6jSbRXKlUHxUBfYseWz E5vhUUv/dnKILvEx+qD0bc9U5G7TKfwEjaWNRVNk13DgwxDZibqBoZIDL2jDzC1h0Koc v2jlJ3dpHjjTZIrEBTTYELDPfL6TjK4DZyxWZdLRexHtSkcYtouHcd8Wibpg6VMz8DiN PmhQ== X-Gm-Message-State: AOAM531fDy31SaMTyNT4BRJJd2VejpEB2UnOcQO4Ui+NIBRiqTPH11vP K9yBRVe5mNO3pZFf52W99pfilw== 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-pm@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