Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5000752imm; Tue, 19 Jun 2018 03:28:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIeqgxSvqmESJ/G8GxBs6CSjlx4XHmLaZPPe+YQ7fuObgBHw5ghix6uT8LeIWgMmpAWX5eT X-Received: by 2002:a17:902:ba87:: with SMTP id k7-v6mr18087137pls.271.1529404090900; Tue, 19 Jun 2018 03:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529404090; cv=none; d=google.com; s=arc-20160816; b=A4oRa3KH/UysOQM9BvsmKS0TyRM+k/m8XnbzVMeHy4o5yLfrPDSHU8OLkOv81fatz8 KsCRpW7hI1nQOnk7y4ZnNeqDaTfMeNGZIKDoyjPGSYnqQjZ4D1H2uKmZUilfOos0bSC1 H9LA9KocqNZvWzYM/ZxMkGUmhJcT7/AUiAN2KAfL4Kbe1w4eHJcUQr/gbouqr+R8v7De fKZQ7iV3D7Ht01/MQVmG7umSRzsYoTalnkvGVHM/XLH5uOpdnZ9dOFrFqfOqsRm0Wd2r FrxMQDtoxQjdrdtdQElCaQj4Ee9NtNfwVc8YKpZenygm7iWqc+mod+K0IuKNFMQc3W2s bCrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=ZYlre9S3GZV9+RMGxVRnXNYd2BIHCbg50ktR0oxkJsE=; b=i6xZAid5G5LWKNzjmJ37FPCOE/UM9QNY2g0hzmrj1Aqr06zQRdqZACokqZN5jI/se8 6s5xZCFFyRKyTVokAmm39vtgmdlRKjuIhOM7ixRRlLbyndAkD1pvZOGQ5jQ96BfVB7S4 AQlv+2U5Rrg1gmI2LOF0mkNeko0kwNDNCejLbdHyn1HUCKbjEjBPZ3fbgtOEH5LH6Iby nutgjCNlf3f8b1p3pBsoFFfD9viCjehMfIgcqBONiBh4gZeJG5pqwkYqnnQR3Aajz7hx SPNX/YQt75nnoDv7lkSm37xbA54x9+oaKHCrKDTegR1yF/32AoSIO1VKM8JUiqcodwLh Whig== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11-v6si13866409pgv.253.2018.06.19.03.27.56; Tue, 19 Jun 2018 03:28:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757098AbeFSK0o (ORCPT + 99 others); Tue, 19 Jun 2018 06:26:44 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47080 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755596AbeFSK0n (ORCPT ); Tue, 19 Jun 2018 06:26:43 -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 9301B1435; Tue, 19 Jun 2018 03:26:42 -0700 (PDT) Received: from [0.0.0.0] (e107985-lin.cambridge.arm.com [10.1.210.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A12F43F25D; Tue, 19 Jun 2018 03:26:37 -0700 (PDT) Subject: Re: [RFC PATCH v3 06/10] sched: Add over-utilization/tipping point indicator To: Pavan Kondeti , Quentin Perret Cc: peterz@infradead.org, rjw@rjwysocki.net, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, mingo@redhat.com, morten.rasmussen@arm.com, chris.redpath@arm.com, patrick.bellasi@arm.com, valentin.schneider@arm.com, vincent.guittot@linaro.org, thara.gopinath@linaro.org, viresh.kumar@linaro.org, tkjos@google.com, joelaf@google.com, smuckle@google.com, adharmap@quicinc.com, skannan@quicinc.com, juri.lelli@redhat.com, edubezval@gmail.com, srinivas.pandruvada@linux.intel.com, currojerez@riseup.net, javi.merino@kernel.org References: <20180521142505.6522-1-quentin.perret@arm.com> <20180521142505.6522-7-quentin.perret@arm.com> <20180619070103.GB9208@codeaurora.org> From: Dietmar Eggemann Message-ID: Date: Tue, 19 Jun 2018 12:26:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180619070103.GB9208@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/19/2018 09:01 AM, Pavan Kondeti wrote: > On Mon, May 21, 2018 at 03:25:01PM +0100, Quentin Perret wrote: [...] >> @@ -8152,6 +8176,9 @@ static inline void update_sg_lb_stats(struct lb_env *env, >> if (nr_running > 1) >> *overload = true; >> >> + if (cpu_overutilized(i)) >> + *overutilized = 1; >> + > > There is no need to check if every CPU is overutilized or not once > *overutilized is marked as true, right? True, so you want to check *overutilized before calling cpu_overutilized() to save a little bit on compute? [...] >> @@ -8586,6 +8621,10 @@ static struct sched_group *find_busiest_group(struct lb_env *env) >> * this level. >> */ >> update_sd_lb_stats(env, &sds); >> + >> + if (sched_energy_enabled() && !READ_ONCE(env->dst_rq->rd->overutilized)) >> + goto out_balanced; >> + > > Is there any reason for sending no-hz idle kicks but bailing out here when > system is not overutilized? Even if a system is not-overutilized, we want to update stale cpu blocked load and utilization so NOHZ_STATS_KICK have to get through. So calling find_busiest_group() -> update_sd_lb_stats() -> update_sg_lb_stats() to possibly execute update_nohz_stats() is IMHO the right thing to do.