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=-13.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,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 E6E90C2D0A3 for ; Thu, 29 Oct 2020 21:34:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C18A2087D for ; Thu, 29 Oct 2020 21:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604007240; bh=LZNa9iN4kRpLdbP7nCl2r/xAohRN3e42oales8zFcrI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=G2AkqApP2upEY76ztQnjFSfPVq8nD6X3yt8pjSIEVw+yE02hzFv9p0vrNy6YTd2mL tantEkRG4s+n1tf8fn8JVC6yZYXXfCqOaXc7ehx3dm4mqQ+tCPe6eMaE/5uq/lvNwi pbcTN6QvlCnhKsyL/Tft9Wngc5Uksso9k7/+7llQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726197AbgJ2Vd7 (ORCPT ); Thu, 29 Oct 2020 17:33:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbgJ2Vd6 (ORCPT ); Thu, 29 Oct 2020 17:33:58 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454D9C0613D2 for ; Thu, 29 Oct 2020 14:33:58 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id a20so4565907ilk.13 for ; Thu, 29 Oct 2020 14:33:58 -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=HBW/y2hcG3tVUMNsYdQ7G3FZLWAgav2W/hDMrrmqMV4=; b=C9wMCxF/YMjZlGOVB+2eKfXEJR92p9m4yP6IxXhK5vhdsXo+p654QnmvgqtQjmvKIC N/O9P5d7uy+RDFfIQuyEavN4FfcpZrYkVXygitutifdRdCWzu8+3G0FjM1vKtQ7PHYKK 9VzbQsSQqpYgOQs1b9DKxZHrBHTy6glApl2AE= 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=HBW/y2hcG3tVUMNsYdQ7G3FZLWAgav2W/hDMrrmqMV4=; b=R/03YOG6q9W4bGxGtQAUOHsucN0OHxi7rljwdma+VYAPUjdMWGMR34XzqNfIymKHTp imAqkGXz2xFT9O615q7XC4l4NoeiLQnd6by1eppzelypGXTVqWpEbZu9rBcG+sHhEFaK AHWUa3mycdLsaDeKL77bSS26sRWARnu/BVRX5D0fWoR227G+CdBsmWGRvArvoATCKDqj PDZWBT7KlhIdawfOvOi1vfJJ12d88fBxaIIKLS3QKYoAO+LRKLyidqlGKuLmiUkodaDt EqrvZWnKxsFhSZW6G41Ty1Ce8ifJLK0Dw/jLbV3MuU8aorTHGcMW45FeueOs/fX8F4fl LgIw== X-Gm-Message-State: AOAM530//Gs1pg3/gp2S0UQ1XLj6ZKflMwTK+jYdZKnFbAconkLX93hg IR0mRmmWPg3DF4m7XGPhJIL2DA== X-Google-Smtp-Source: ABdhPJzjjq7wQ7GrmP2vMxl7uTfJhlv8ruaD8BA9kXgZ+jONnT6TAdwrOl602ZGmTwFaprEnbt3cow== X-Received: by 2002:a92:cb4e:: with SMTP id f14mr4494426ilq.122.1604007237554; Thu, 29 Oct 2020 14:33:57 -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 n84sm3955870ild.16.2020.10.29.14.33.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Oct 2020 14:33:56 -0700 (PDT) Subject: Re: [PATCH v4] 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: <20201023152527.15884-1-latha@linux.vnet.ibm.com> From: Shuah Khan Message-ID: <66932174-384a-5da4-4786-955f1e6233f6@linuxfoundation.org> Date: Thu, 29 Oct 2020 15:33:56 -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: <20201023152527.15884-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/23/20 9:25 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 patch adds helper functions to find both online and offline CPUs and > print them out accordingly. > > 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(-) > > v1-->v2: Added helper functions to find online and offline CPUs and print them. > v2-->v3: Fixed some build issues > v3-->v4: Fixed the commit log and moved the version summary to the correct place. > Thank you. Applied to https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=cpupower Will be included in my next pull request to PM maintainer. thanks, -- Shuah