From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756755AbcBJB5W (ORCPT ); Tue, 9 Feb 2016 20:57:22 -0500 Received: from mail-lb0-f196.google.com ([209.85.217.196]:34516 "EHLO mail-lb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756565AbcBJB5U (ORCPT ); Tue, 9 Feb 2016 20:57:20 -0500 MIME-Version: 1.0 In-Reply-To: <56BA8C29.4090905@linaro.org> References: <3071836.JbNxX8hU6x@vostro.rjw.lan> <56B93548.9090006@linaro.org> <5387313.xAhVpzgZCg@vostro.rjw.lan> <56BA8C29.4090905@linaro.org> Date: Wed, 10 Feb 2016 02:57:18 +0100 X-Google-Sender-Auth: qoVe2-EOaMAS_3fSAco-zWrmAqc 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 2:02 AM, Steve Muckle wrote: > 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. So if I'm reading this correctly, it would be better to put the hooks into update_curr_rt/dl()? Thanks, Rafael