Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2333295imm; Fri, 7 Sep 2018 14:51:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZJbcMnTNI1GQiJq6CkFsteKWFzZhOZi1ryzvv69ZaUZgzHuqxQSaYwdN8M9pOcZgOomn2e X-Received: by 2002:a63:d09:: with SMTP id c9-v6mr10576797pgl.314.1536357080187; Fri, 07 Sep 2018 14:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536357080; cv=none; d=google.com; s=arc-20160816; b=PFps7UbTDTtYmGxFg7jFKT4f5HlPqsRgR1A2Zp3XyBzX5Z0tYbnW95DBbK027I+72y GREpl17JfWUpGcESzTcgf+tqy+1ShJen4OYsglovTJ6WTjLDU38WP9diE7O+VO5lJedB eY///n1D6O37bEoAWuIm3Y0yTq0RMePZVP3ckTMmgr/ynV8OdAvugDCv3/GoJGsoI0f7 ENEaqkNe3FNcgcJzbfsD5O4L4GgslFr4yxJM3cKRrLX4NnqoEP+VM3AJd5+tszp7KgJO rjiImmnw/dWp1nX2cR/ExKkxHng97PDXk6wW0Eb9nNAPnWIEbIXETRMpmNwk3OpXrjFv RYag== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nMWkasYEaZOcKd+jyYJseO+NDd8EiVeCIBz4OWk3XYE=; b=MRfY4RHHYvYKeW0QYNAvdp1WT266mXBahhhLfg4qP2XqXn4MAvkbNOfj63xi8W2O+A TFd7AD5iFy0b3lBPsYZZr2CijmYaoJXy8fPYpGwnyTatOSdOJL7D8kPuiZx4RApKjDYp L9bWX2SPWwgPorlBZP4gGPw8/E5MxSiFj/u5m5cZBjoHrx4ns+aqa1kIrvR4tgpPWTmp SVVVhaAixi0mEAuafVRGqDzXsfKuGOOi0+kTGNw0kVFujJ8xKxlUAOV7R++HU9SR177L y3PxHWrLhHZ304X3L79MiZ7IMDmC08oNHZ7RPMzEnp8udR7ebXmxmJc4+3e9GNIzp5Oe euNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=LGypyXNY; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13-v6si9650993pgd.280.2018.09.07.14.51.04; Fri, 07 Sep 2018 14:51:20 -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; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=LGypyXNY; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730923AbeIHC1O (ORCPT + 99 others); Fri, 7 Sep 2018 22:27:14 -0400 Received: from smtp-fw-4101.amazon.com ([72.21.198.25]:50633 "EHLO smtp-fw-4101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730345AbeIHC1H (ORCPT ); Fri, 7 Sep 2018 22:27:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1536356651; x=1567892651; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nMWkasYEaZOcKd+jyYJseO+NDd8EiVeCIBz4OWk3XYE=; b=LGypyXNY0OgD7fpo4F2Zh+3e9Ed1ogknnoMBSD5YjtlLJijf70HXfdY7 jI/S1pIs3b6gUV72u2PvyRhuG7JeVxjqwSU3/cxWIB4JJivbzAsxkpr9n yncm2a753t66c7nq6BBuO3mKO3VdZVTN/KHvevMeZqN+a1lBUVufHH5lL k=; X-IronPort-AV: E=Sophos;i="5.53,343,1531785600"; d="scan'208";a="737530648" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2c-579b7f5b.us-west-2.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2018 21:44:10 +0000 Received: from u7588a65da6b65f.ant.amazon.com (pdx2-ws-svc-lb17-vlan2.amazon.com [10.247.140.66]) by email-inbound-relay-2c-579b7f5b.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id w87LgTfA042987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 7 Sep 2018 21:42:31 GMT Received: from u7588a65da6b65f.ant.amazon.com (localhost [127.0.0.1]) by u7588a65da6b65f.ant.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTPS id w87LgStE027600 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 7 Sep 2018 23:42:28 +0200 Received: (from jschoenh@localhost) by u7588a65da6b65f.ant.amazon.com (8.15.2/8.15.2/Submit) id w87LgReg027599; Fri, 7 Sep 2018 23:42:27 +0200 From: =?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= To: Ingo Molnar , Peter Zijlstra Cc: =?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= , linux-kernel@vger.kernel.org Subject: [RFC 38/60] cosched: Skip updates on non-CPU runqueues in cfs_rq_util_change() Date: Fri, 7 Sep 2018 23:40:25 +0200 Message-Id: <20180907214047.26914-39-jschoenh@amazon.de> X-Mailer: git-send-email 2.9.3.1.gcba166c.dirty In-Reply-To: <20180907214047.26914-1-jschoenh@amazon.de> References: <20180907214047.26914-1-jschoenh@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function cfs_rq_util_change() notifies frequency governors of utilization changes, so that they can be scheduler driven. This is coupled to per CPU runqueue statistics. So, don't do anything when called for non-CPU runqueues. Signed-off-by: Jan H. Schönherr --- kernel/sched/fair.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a2945355f823..33e3f759eb99 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3015,7 +3015,16 @@ static inline void update_cfs_group(struct sched_entity *se) static inline void cfs_rq_util_change(struct cfs_rq *cfs_rq, int flags) { - struct rq *rq = rq_of(cfs_rq); + struct rq *rq = hrq_of(cfs_rq); + +#ifdef CONFIG_COSCHEDULING + /* + * This function is currently only well defined for per-CPU + * runqueues. Don't execute it for anything else. + */ + if (rq->sdrq_data.level) + return; +#endif if (&rq->cfs == cfs_rq || (flags & SCHED_CPUFREQ_MIGRATION)) { /* -- 2.9.3.1.gcba166c.dirty