From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752557AbcBJVtb (ORCPT ); Wed, 10 Feb 2016 16:49:31 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36851 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751464AbcBJVt0 (ORCPT ); Wed, 10 Feb 2016 16:49:26 -0500 MIME-Version: 1.0 In-Reply-To: <56BB93BB.5050405@linaro.org> References: <3071836.JbNxX8hU6x@vostro.rjw.lan> <56B93548.9090006@linaro.org> <5387313.xAhVpzgZCg@vostro.rjw.lan> <56BA8C29.4090905@linaro.org> <56BB93BB.5050405@linaro.org> Date: Wed, 10 Feb 2016 22:49:24 +0100 X-Google-Sender-Auth: 8vvAURSm_5sBeSRn5wwdcghtIW0 Message-ID: Subject: Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks From: "Rafael J. Wysocki" To: Steve Muckle Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Peter Zijlstra , Linux PM list , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Juri Lelli , Thomas Gleixner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2016 at 8:47 PM, Steve Muckle wrote: > On 02/09/2016 07:09 PM, Rafael J. Wysocki wrote: >>>> >> I think additional hooks such as enqueue/dequeue would be needed in >>>> >> RT/DL. The task tick callbacks will only run if a task in that class is >>>> >> executing at the time of the tick. There could be intermittent RT/DL >>>> >> task activity in a frequency domain (the only task activity there, no >>>> >> CFS tasks) that doesn't happen to overlap the tick. Worst case the task >>>> >> activity could be periodic in such a way that it never overlaps the tick >>>> >> and the update is never made. >>> > >>> > So if I'm reading this correctly, it would be better to put the hooks >>> > into update_curr_rt/dl()? > > That should AFAICS be sufficient to avoid stalling. It may be more than > is required as that covers more than just enqueue/dequeue but I'm not > sure offhand. > >> >> 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. Both are good enough IMO, but I can update the patch to use rq_clock() if that's preferred. Thanks, Rafael