Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1008509yba; Fri, 3 May 2019 14:19:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxX9hRN7AbL1Anme1I2GApIXkEuZOqgQhPEPWE2zsCZi+RzeFt2A11kLYAf+cAWaTJlzkg9 X-Received: by 2002:a63:cc0b:: with SMTP id x11mr13212665pgf.35.1556918339922; Fri, 03 May 2019 14:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556918339; cv=none; d=google.com; s=arc-20160816; b=bh7eKeTKuFYZi890pE+qtBF7macdBG4j5pDswt4gbFAEaVIpsXZihz77f9OCO+5974 1XxIHPKvbt5x+pYYu+EcFcoSIP05nnHt1KXMORlxcIuUNUQFJA1Ra9DWCC1NYAbcXZHU 4MN23Km5wCQchYyPc39GomCmRLp/89OVAkJgmVEphgyCk5sKQkAx+bmpGe/D4uMLYd2/ jQfcf2JRmmPhDCENFkmQpNMoKTNn012BtR91Maw5Cht/Vn93OFqkTJuw4tx17hL0G2ha ZW8FiADeklcbJQudBvHHJ6lSzy8Imr9yp+M0sI5GZfPBpOz7q8er5eEdlOmHenE8QeEn bhvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=4wsRkkLLbJZmIvxgiyssDJeBv4EOkgSlgxV1aVYUQGg=; b=VEIdzGGFfhjP59OHWEebrp8eIdAguJimJRvuXxCeGrrIkc7ZeEP4vfwY1cCBxS6pZc uhsEGlXGSNeVWz7AxtLQDi1q+oOO0IsNwugv9zqGOopBSpYFpIkdOZltYZW8VQ0EFgvh 6Gf2Jni53EHZ27TJ5ZhqztvWa+EjVhrjMF3zypQYslTsqEsDthDd/h9kCxh2MWGrw5RP BaKG6SyVnzNcP9vPziPiu8vaZCcqxaQfjCn6v6mFgaJgwTsaFJrZaBQl2J6TskOB5pRM 2BZ3/kcFI1sQGqyVWeUqHOTovD7ufzhhLTZaN8NPo0IkFEDEzzQSKZKPeWTZxSLwYQtn L2+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EY8Wl3cm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r18si3808129pgv.212.2019.05.03.14.18.44; Fri, 03 May 2019 14:18:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EY8Wl3cm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbfECVL2 (ORCPT + 99 others); Fri, 3 May 2019 17:11:28 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38544 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfECVL2 (ORCPT ); Fri, 3 May 2019 17:11:28 -0400 Received: by mail-wr1-f66.google.com with SMTP id k16so9454066wrn.5 for ; Fri, 03 May 2019 14:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=4wsRkkLLbJZmIvxgiyssDJeBv4EOkgSlgxV1aVYUQGg=; b=EY8Wl3cmPCIHcC7tSICoTy7i1jTYAsNZQ00IkCRNDeUDGRCi84sp1wmDsp+y7Nm1bF q4ilEa6paeqrhCFs9yybJoSO7xWZ34eMqyYuhj3Ykin+hdTWPWy2MDSAKRwltLMQjt9j MVElim7mXFADIzxluh4ujiwpTSCJ9ou5596ZOvhCuwdCcM6Or2RDxspWMi9BBHQEUgkW axYhFUeLIDcIRKthpNNvP370b6GiNYhCSIQDG13l4GnQL2o0q2dyRMRe7YdOBpxWHdwk /1sNK56kKQl4uuAmVrgNO0wZY7SMMJ1H0XcRGhGlC3P1iDmCIgyY+mQyfOa5qJcDD++U cbVg== 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=4wsRkkLLbJZmIvxgiyssDJeBv4EOkgSlgxV1aVYUQGg=; b=KNWFp9yUKH97W8Fp/kf5gzy63gJl8bbruEUp6LMXirgrsREbA9gnZFSoZ23LyA632s lbSQ97sAqSBSzq35EwXSUoByNmtNNs7VReaqkrnywNCiuoUFOD2niacQ64dCqtSYFSgr NastNfhohOlCCutOKtjGMZgnHtRezn2f4yuPRPEnnxh/Y4+AzMwJgVgLea4fNGInI2W3 Y4RpVPlVC24XC7ckhzknxNuti+i7L8lZO5JI1b/vWioZ7oE9MZTP+m6IZk9hJ9efCWsn PAcvltwAay6uFMavrZXQMzFddmr4anEpqLpfgYpmupHFooYSPDbDxOB5r5rZILintv3V wwJw== X-Gm-Message-State: APjAAAWRYskKC982nADQ0NXU7X9887LZ65rhOXkMlQiYL5RBIE2zrK8K 0mhDqSjhbKMBBERezfLt2vycQQ== X-Received: by 2002:a5d:6087:: with SMTP id w7mr2004398wrt.212.1556917886220; Fri, 03 May 2019 14:11:26 -0700 (PDT) Received: from [192.168.0.41] (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.googlemail.com with ESMTPSA id u11sm5269768wmu.15.2019.05.03.14.11.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2019 14:11:25 -0700 (PDT) Subject: Re: [PATCH] thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power To: Matthias Kaehlcke , Amit Daniel Kachhap , Viresh Kumar , Javi Merino , Zhang Rui , Eduardo Valentin Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson References: <20190502183238.182058-1-mka@chromium.org> From: Daniel Lezcano Message-ID: <85246ec5-2dd7-f7fb-535f-0268af399480@linaro.org> Date: Fri, 3 May 2019 23:11:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190502183238.182058-1-mka@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/05/2019 20:32, Matthias Kaehlcke wrote: > The CPU load values passed to the thermal_power_cpu_get_power > tracepoint are zero for all CPUs, unless, unless the > thermal_power_cpu_limit tracepoint is enabled too: > > irq/41-rockchip-98 [000] .... 290.972410: thermal_power_cpu_get_power: > cpus=0000000f freq=1800000 load={{0x0,0x0,0x0,0x0}} dynamic_power=4815 > > vs > > irq/41-rockchip-96 [000] .... 95.773585: thermal_power_cpu_get_power: > cpus=0000000f freq=1800000 load={{0x56,0x64,0x64,0x5e}} dynamic_power=4959 > irq/41-rockchip-96 [000] .... 95.773596: thermal_power_cpu_limit: > cpus=0000000f freq=408000 cdev_state=10 power=416 > > There seems to be no good reason for omitting the CPU load information > depending on another tracepoint. My guess is that the intention was to > check whether thermal_power_cpu_get_power is (still) enabled, however > 'load_cpu != NULL' already indicates that it was at least enabled when > cpufreq_get_requested_power() was entered, there seems little gain > from omitting the assignment if the tracepoint was just disabled, so > just remove the check. > > Fixes: 6828a4711f99 ("thermal: add trace events to the power allocator governor") > Signed-off-by: Matthias Kaehlcke > --- Yes, load_cpu is needed in any case for both traces. The change makes sense. Reviewed-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog