From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755862AbcBJBCh (ORCPT ); Tue, 9 Feb 2016 20:02:37 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:33575 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbcBJBCf (ORCPT ); Tue, 9 Feb 2016 20:02:35 -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> Cc: "Rafael J. Wysocki" , Peter Zijlstra , Linux PM list , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Juri Lelli , Thomas Gleixner From: Steve Muckle X-Enigmail-Draft-Status: N1110 Message-ID: <56BA8C29.4090905@linaro.org> Date: Tue, 9 Feb 2016 17:02:33 -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: <5387313.xAhVpzgZCg@vostro.rjw.lan> 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/09/2016 12:05 PM, Rafael J. Wysocki wrote: >>> One concern I had was, given that the lone scheduler update hook is in >>> CFS, is it possible for governor updates to be stalled due to RT or DL >>> task activity? >> >> I don't think they may be completely stalled, but I'd prefer Peter to >> answer that as he suggested to do it this way. > > In any case, if that concern turns out to be significant in practice, it may > be addressed like in the appended modification of patch [1/3] from the $subject > series. > > With that things look like before from the cpufreq side, but the other sched > classes also get a chance to trigger a cpufreq update. The drawback is the > cpu_clock() call instead of passing the time value from update_load_avg(), but > I guess we can live with that if necessary. > > FWIW, this modification doesn't seem to break things on my test machine. > ... > Index: linux-pm/kernel/sched/rt.c > =================================================================== > --- linux-pm.orig/kernel/sched/rt.c > +++ linux-pm/kernel/sched/rt.c > @@ -2212,6 +2212,9 @@ static void task_tick_rt(struct rq *rq, > > update_curr_rt(rq); > > + /* Kick cpufreq to prevent it from stalling. */ > + cpufreq_kick(); > + > watchdog(rq, p); > > /* > Index: linux-pm/kernel/sched/deadline.c > =================================================================== > --- linux-pm.orig/kernel/sched/deadline.c > +++ linux-pm/kernel/sched/deadline.c > @@ -1197,6 +1197,9 @@ static void task_tick_dl(struct rq *rq, > { > update_curr_dl(rq); > > + /* Kick cpufreq to prevent it from stalling. */ > + cpufreq_kick(); > + > /* > * Even when we have runtime, update_curr_dl() might have resulted in us > * not being the leftmost task anymore. In that case NEED_RESCHED will 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. thanks, steve