Received: by 10.223.176.46 with SMTP id f43csp624993wra; Wed, 24 Jan 2018 03:34:36 -0800 (PST) X-Google-Smtp-Source: AH8x225kFD5QSAr8hTkd/HPprpGQCrdlM8b1Bhh99rRYO7Wx8byhRPdDklU6z1/Ua9+XCni4/DTN X-Received: by 2002:a17:902:e65:: with SMTP id 92-v6mr5009514plw.148.1516793676558; Wed, 24 Jan 2018 03:34:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516793676; cv=none; d=google.com; s=arc-20160816; b=xf3BE25BHtk5gNnukVoFWXdA0dp+YSGZIzNC7vRGJaGheAAvEfpCzxrfTNZB3R57Nw rCPCi+wdSLj248oAgxROw9RV1sPSKm0FzkRYv/uD5chOcnhKo8bq+O4VekEXzfVarZrO h5thkAMh4VoQJQlsevZEULK4cjmhTbuZ7wv2p7S5bIBNJPebSh3h75ik9eiZXQ5GMtXD 5USDUtmBoFKsQVOH7vx0WuqZEepGCmZQ4QpPAUVh7Q7ILKP1B/uq0Ptem/Oua22sfGEW b/zQpIUtN69MBXd7NwEsTOgkYxsImqUB1JrM+uKF0bouOVEgLd7TbFuIvZF61BD8e9/N Xoqw== 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:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=gqXF9xFU5RQxpTNMiv/4nIg3iVXpZz2B9fei7A/2klo=; b=ppj/tjEyUsunWSNsRgRT9JHktnhIB3DGZq7wiyG5qXH5bRCXJYT3urga/wcZZM/xMi rI5BJzQWyRAKbUCzLu6+Bz51xNhyzMei82ODZeyI096TBCF8Go4UFbKNNvw3zSxmYCmO WB0MF/xW4MsH5asWF/8XM1Vy3XUu++TBk/OGBrmalnce7X2t5pBRsxNhMAkW4TY5DAUk BI6Ri/ezN3AA9sodJqdEuAgKJNbiQm6SWp6L2PjNZtjqA+rrvTNSPMcyfWabR9G1l+tk rlWHoyBSZ59pTlqM6o/X5smWlTgqxfnWLnFbYjvybtDdfRLDfBmhxlVbNITMOc8B7e38 Ae+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=TzUNeL+X; dkim=pass header.i=@codeaurora.org header.s=default header.b=TzUNeL+X; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k136si44748pga.44.2018.01.24.03.34.22; Wed, 24 Jan 2018 03:34:36 -0800 (PST) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=TzUNeL+X; dkim=pass header.i=@codeaurora.org header.s=default header.b=TzUNeL+X; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933481AbeAXLdz (ORCPT + 99 others); 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 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C48BA60A60; Wed, 24 Jan 2018 11:33:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516793630; bh=n5KP6a2k8BjH2J62eTHA0uodGCg0u62rhJBj+SFl4Fo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TzUNeL+X8vMtBNCC6+vUYq5L561oPS87f5O3fZXO7yeUBjW3/bNeRk8ii8mISMlgh HsCOg2bzeqIkELhvpXK88qa9hR15VD0hdPFcDqQjCHg99XePMzTyGEi23hUnOZ2uz4 fISNdWD8drfD6ri8v7iPRIjByiKUbLKQ0dXs3Jh8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: pkondeti@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id AEDDE60112; Wed, 24 Jan 2018 11:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516793630; bh=n5KP6a2k8BjH2J62eTHA0uodGCg0u62rhJBj+SFl4Fo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TzUNeL+X8vMtBNCC6+vUYq5L561oPS87f5O3fZXO7yeUBjW3/bNeRk8ii8mISMlgh HsCOg2bzeqIkELhvpXK88qa9hR15VD0hdPFcDqQjCHg99XePMzTyGEi23hUnOZ2uz4 fISNdWD8drfD6ri8v7iPRIjByiKUbLKQ0dXs3Jh8= 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 Precedence: bulk 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.