From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933513AbeAXLdz (ORCPT ); Wed, 24 Jan 2018 06:33:55 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:40916 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933222AbeAXLdv (ORCPT ); Wed, 24 Jan 2018 06:33:51 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AEDDE60112 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=pkondeti@codeaurora.org Date: Wed, 24 Jan 2018 17:03:42 +0530 From: Pavan Kondeti To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Paul Turner , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle , pkondeti@codeaurora.org Subject: Re: [PATCH v3 2/3] sched/fair: use util_est in LB and WU paths Message-ID: <20180124113342.GD30677@codeaurora.org> References: <20180123180847.4477-1-patrick.bellasi@arm.com> <20180123180847.4477-3-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180123180847.4477-3-patrick.bellasi@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Patrick, On Tue, Jan 23, 2018 at 06:08:46PM +0000, Patrick Bellasi wrote: > static unsigned long cpu_util_wake(int cpu, struct task_struct *p) > { > - unsigned long util, capacity; > + long util, util_est; > > /* Task has no contribution or is new */ > if (cpu != task_cpu(p) || !p->se.avg.last_update_time) > - return cpu_util(cpu); > + return cpu_util_est(cpu); > > - capacity = capacity_orig_of(cpu); > - util = max_t(long, cpu_rq(cpu)->cfs.avg.util_avg - task_util(p), 0); > + /* Discount task's blocked util from CPU's util */ > + util = cpu_util(cpu) - task_util(p); > + util = max(util, 0L); > > - return (util >= capacity) ? capacity : util; > + if (!sched_feat(UTIL_EST)) > + return util; At first, It is not clear to me why you are not clamping the capacity to CPU original capacity. It looks like it is not needed any more with commit f453ae2200b0 ("sched/fair: Consider RT/IRQ pressure in capacity_spare_wake()") inclusion. May be a separate patch to remove the clamping part? Thanks, Pavan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.