Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756334AbcCaMe2 (ORCPT ); Thu, 31 Mar 2016 08:34:28 -0400 Received: from casper.infradead.org ([85.118.1.10]:47233 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654AbcCaMe0 (ORCPT ); Thu, 31 Mar 2016 08:34:26 -0400 Date: Thu, 31 Mar 2016 14:34:24 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: Steve Muckle , Dietmar Eggemann , Ingo Molnar , linux-kernel , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Morten Rasmussen , Juri Lelli , Patrick Bellasi , Michael Turquette Subject: Re: [PATCH 1/2] sched/fair: move cpufreq hook to update_cfs_rq_load_avg() Message-ID: <20160331123424.GI3430@twins.programming.kicks-ass.net> References: <56F91D56.4020007@arm.com> <56F95D10.4070400@linaro.org> <56F97856.4040804@arm.com> <56F98832.3030207@linaro.org> <20160330193544.GD407@worktop> <20160331093408.GB12845@twins.programming.kicks-ass.net> <20160331104705.GG3430@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 955 Lines: 31 On Thu, Mar 31, 2016 at 02:14:50PM +0200, Vincent Guittot wrote: > In fact, I looks for the sequence where the utilization of a rq is not > updated until the next tick but i can't find it. No, util it always updated, however.. > If cpu doesn't share cache, task is added to wake list and an ipi is > sent and the utilization. Here we run: ttwu_do_activate() ttwu_activate() activate_task() enqueue_task() p->sched_class->enqueue_task() := enqueue_task_fair() update_load_avg() update_cfs_rq_load_avg() cfs_rq_util_change() On the local cpu, and we can indeed call out to have the frequency changed. > Otherwise, we directly enqueue the task on > the rq and the utilization is updated But here we run it on a remote cpu, so we cannot call out and the frequency remains the same. So if a remote wakeup on the same LLC domain happens, utilization will increase but we will not observe until the next tick.