From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751247AbcBJWHz (ORCPT ); Wed, 10 Feb 2016 17:07:55 -0500 Received: from mail-pf0-f174.google.com ([209.85.192.174]:36498 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbcBJWHx (ORCPT ); Wed, 10 Feb 2016 17:07:53 -0500 Subject: Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks To: "Rafael J. Wysocki" References: <3071836.JbNxX8hU6x@vostro.rjw.lan> <56B93548.9090006@linaro.org> <5387313.xAhVpzgZCg@vostro.rjw.lan> <56BA8C29.4090905@linaro.org> <56BB93BB.5050405@linaro.org> Cc: "Rafael J. Wysocki" , Peter Zijlstra , Linux PM list , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Juri Lelli , Thomas Gleixner From: Steve Muckle Message-ID: <56BBB4B7.2070209@linaro.org> Date: Wed, 10 Feb 2016 14:07:51 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/10/2016 01:49 PM, Rafael J. Wysocki wrote: >>> If done this way, I guess we may pass rq_clock_task(rq) as the time >>> >> arg to cpufreq_update_util() from there and then the cpu_lock() call >>> >> I've added to this prototype won't be necessary any more. >> > >> > Is it rq_clock_task() or rq_clock()? The former can omit irq time so may >> > gradually fall behind wall clock time, delaying callbacks in cpufreq. > > What matters to us is the difference between the current time and the > time we previously took a sample and there shouldn't be too much > difference between the two in that respect. Sorry, the reference to wall clock time was unnecessary. I just meant it can lose time, which could cause cpufreq updates to be delayed during irq heavy periods. > Both are good enough IMO, but I can update the patch to use rq_clock() > if that's preferred. I do believe rq_clock should be used as workloads such as heavy networking could spend a significant portion of time in interrupts, skewing rq_clock_task significantly, assuming I understand it correctly. thanks, Steve