Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753607AbbLOCmO (ORCPT ); Mon, 14 Dec 2015 21:42:14 -0500 Received: from mail-pf0-f173.google.com ([209.85.192.173]:35972 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752616AbbLOCmL (ORCPT ); Mon, 14 Dec 2015 21:42:11 -0500 Subject: Re: [RFCv6 PATCH 07/10] sched/fair: jump to max OPP when crossing UP threshold To: Juri Lelli References: <1449641971-20827-1-git-send-email-smuckle@linaro.org> <1449641971-20827-8-git-send-email-smuckle@linaro.org> <20151211111250.GA8070@e106622-lin> Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Patrick Bellasi , Michael Turquette From: Steve Muckle X-Enigmail-Draft-Status: N1110 Message-ID: <566F7E00.70505@linaro.org> Date: Mon, 14 Dec 2015 18:42:08 -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: <20151211111250.GA8070@e106622-lin> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1181 Lines: 30 Hi Juri, On 12/11/2015 03:12 AM, Juri Lelli wrote: >> @@ -2895,6 +2934,8 @@ void scheduler_tick(void) >> > trigger_load_balance(rq); >> > #endif >> > rq_last_tick_reset(rq); >> > + >> > + sched_freq_tick(cpu); > We are not holding rq->lock anymore at this points, and this collides > with comment in update_cpu_capacity_request(). Can't you just move this > up before raw_spin_unlock(&rq->lock)? My thinking in putting it last was to have it after the possible periodic load balance, so that we don't initiate a frequency change only to have to modify the frequency again immediately afterwards. Thinking more about it, the way we currently have the policy defined there's no concern with having it earlier since sched_freq_tick only causes the frequency to go to fmax (or do nothing). If we modify the policy so that sched_freq_tick can cause arbitrary frequency changes then I think this may need more thought. thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/