Received: by 10.192.165.148 with SMTP id m20csp540289imm; Wed, 25 Apr 2018 03:58:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ZYBQ/RH30ZKemq+gAy3okoW3YK+p5PSr3HHzIoGjumvpaiFtzN1ACe0eh/r99IAxeuuLv X-Received: by 10.101.75.202 with SMTP id p10mr23620467pgr.339.1524653904072; Wed, 25 Apr 2018 03:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524653904; cv=none; d=google.com; s=arc-20160816; b=kRYaZOTmrtsJRGFP0pjNWTCboSDzea2qJf+01if0A0VVI6Qpkcfvpj5BrrDU+HXS+6 Tr9aByhcsqakYRhUbk4VFBTNhk2YQnr6JIcooFpf98kQXQZCNEn8SnDB5GPJ4MlN9qfz jOVpCGSls1J8tDLxqMvFNJELMy++LNx0XN1Ho6WY5iCtBRM3jrKLbZtzXZfS7Ct+wz/p tL14yR+lFz5HxYNtYIFr4EGHan3s6xkDPKMeA93eEsb6czpvXtkibCoJjW4Eg2G55Bx3 Fl7nzEDG2L4eMGHBBeszjO+nwGqkpgkX5bGz6UtcTie+OMbvXeRnI0sqFaKg27KD9pfI krUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Ci3WR62gAu3QBXS+SmIClzOJL6PjiPBlcYWTr9YPQtQ=; b=ANVr2gJoo5gGosv0I+9t8Dj/kfATkHieBQWCbjtSwhdbtSthPlbTasmEawo2zpeZt3 oLOTQAeoQXVXy15M8qgRrCIV+XWlG5BDvtIALDawCNipm2rRT73Ss9Ec83yoOzKgbLpl JumKdE/cyl0dJpB7iqsY0uS82iVzG0D3I3hs4rwDIM+lZPTvqKKibPInekljC1SiXVk6 HSDvddM/teYBOYAmhqOHBOyZfXQBEelTqhtcogo6Tm14vV3pgGAVBQBSQVEm6Eg1GJj/ vDGbLBjL3UwQoBni4/LsazWQhZIWwyN9v47R4IqIXtBtS23QcEhcJKUjFbesQfp1qqXy ZsYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3-v6si16918145plt.233.2018.04.25.03.58.10; Wed, 25 Apr 2018 03:58:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754201AbeDYK4H (ORCPT + 99 others); Wed, 25 Apr 2018 06:56:07 -0400 Received: from foss.arm.com ([217.140.101.70]:37828 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbeDYK4E (ORCPT ); Wed, 25 Apr 2018 06:56:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C62431435; Wed, 25 Apr 2018 03:56:03 -0700 (PDT) Received: from e108498-lin.cambridge.arm.com (e108498-lin.cambridge.arm.com [10.1.210.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 72A173F487; Wed, 25 Apr 2018 03:56:02 -0700 (PDT) Date: Wed, 25 Apr 2018 11:55:57 +0100 From: Quentin Perret To: Viresh Kumar Cc: Peter Zijlstra , Valentin Schneider , Ingo Molnar , Vincent Guittot , Daniel Lezcano , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/fair: Rearrange select_task_rq_fair() to optimize it Message-ID: <20180425105557.GA10471@e108498-lin.cambridge.arm.com> References: <8a34a16da90b9f83ffe60316a074a5e4d05b59b0.1524479666.git.viresh.kumar@linaro.org> <434fa179-7c8f-8a01-a07a-4527521a04c7@arm.com> <20180424104304.GE4064@hirez.programming.kicks-ass.net> <0985e709-0d71-2c08-20a9-7bfb618fb5f2@arm.com> <20180424123523.GF4064@hirez.programming.kicks-ass.net> <20180425051509.aohopadqw7q5urbd@vireshk-i7> <20180425081334.GF14391@e108498-lin.cambridge.arm.com> <20180425090327.7mwm2pdheeptz6sd@vireshk-i7> <20180425093909.GI14391@e108498-lin.cambridge.arm.com> <20180425101313.zwxg7gz2ybnvlvtn@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180425101313.zwxg7gz2ybnvlvtn@vireshk-i7> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 25 Apr 2018 at 15:43:13 (+0530), Viresh Kumar wrote: > On 25-04-18, 10:39, Quentin Perret wrote: > > On Wednesday 25 Apr 2018 at 14:33:27 (+0530), Viresh Kumar wrote: > > > On 25-04-18, 09:13, Quentin Perret wrote: > > > > While you're at it, you could probably remove the one in wake_cap() ? I > > > > think having just one in select_task_rq_fair() should be enough. > > > > > > Just make it clear, you are asking me to remove sync_entity_load_avg() > > > in wake_cap() ? But aren't we required to do that, as in the very next > > > line we call task_util(p) ? > > > > Right, we do need to call sync_entity_load_avg() at some point before > > calling task_util(), but we don't need to re-call it in strf() > > after in this case. So my point was just that if you want to re-work > > the wake-up path and make sure we don't call sync_entity_load_avg() > > if not needed then this might need fixing as well ... Or maybe we don't > > care since re-calling sync_entity_load_avg() should be really cheap ... > > These are in two very different paths and I am not sure of a clean way > to avoid calling sync_entity_load_avg() again. Maybe will leave it as > is for now. Fair enough, I don't really like this double call but, looking into more details, I'm not sure how to avoid it cleanly either ...