Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2330107imm; Fri, 7 Sep 2018 14:47:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaHgLNQ239SgUeNTknqzNZ/5KMAe+nJ+tLdiNyi5pjUfDAUG1UUO6yWOG+rpA6VRLLlFndk X-Received: by 2002:a17:902:7587:: with SMTP id j7-v6mr10167215pll.256.1536356843625; Fri, 07 Sep 2018 14:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536356843; cv=none; d=google.com; s=arc-20160816; b=JaGAmzjn4q66dfATIL/xOzMA6gTViMskzQHEZWzdeUV2zApCe8iO3DPVO2g5k3gc/Y ut61GlYq2MijZ53gAMoAk1g2b8bvI9itaZJ1m3AEFEa2GNFpAe7cM6JHBJb1h/CHx1LL F1OOuZepIynE5Ri1q7M0R1At6DqJC5FUj2Mxc5FGwrmkytn2GzKTDjwARHfAA1Q4d5YR qG0rFyJ+uDphdydwVFrAcohhosLcu7vEypQ9aPydscZPoIy32rqKOWmTwWnP6NJS4oBn b+PEOMrwDZACHoo5Ke6V02VCdyDMfMAxv+lr6AFqd+MRONJ0qgRdoBxqKask+2xCnU9M u9RA== 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=5TVCAbCNQimEbznS0QNotFWxXrVtXPfzujB44VzEifU=; b=u21GcYqXowk23+pRToTjGnQQ6cqgSTTMfA8rMh+JHR1pBl2xugRJa1j8GXFT+ov8Dn /SE6dMLWjddrDlNkyIgoYFncZMdb47uMJNzxL1PMw6po7U2W2qkfC5JjijUKcugu41bm WPO/GXaoXNepY68RXOm75t0VSYKcMnhK+Cb/LWnMeRJqD3boqavS0Rcik+kN934iIFG1 7JzTvSG+mr9l7v/H2+sM7EMXf+YaimatciSUoTKElBZkHzGcv/IeU97q8I/iMT7ofRiC cal2v/dy2ks7mcpKAwOKlHUo2R8CqWPRx0XOa9sC7ThlyTrNvlEdWgg2pPiKUTSX8QDB Ohvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=UnHiM6SN; 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 d34-v6si9454071pla.195.2018.09.07.14.47.08; Fri, 07 Sep 2018 14:47:23 -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=UnHiM6SN; 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 S1731142AbeIHC2T (ORCPT + 99 others); Fri, 7 Sep 2018 22:28:19 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:29647 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728351AbeIHC2S (ORCPT ); Fri, 7 Sep 2018 22:28:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1536356722; x=1567892722; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5TVCAbCNQimEbznS0QNotFWxXrVtXPfzujB44VzEifU=; b=UnHiM6SNIgNYWlElYZ7kFiUFZpCdZQxEezYYUn6xKn4BC6Gf+Y7jq2k+ gQpPXDM+EJiHLGuzhMnELzhdqIoVSfihzTZSjPtHPO59FAT9zyrwC/Csg zPbQ1XNtRuCjhm4gvRlp4VgeMYwFCUmdJNnbkkHYCM0XV6W31wQY6J19e o=; X-IronPort-AV: E=Sophos;i="5.53,343,1531785600"; d="scan'208";a="752286694" Received: from sea3-co-svc-lb6-vlan2.sea.amazon.com (HELO email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com) ([10.47.22.34]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2018 21:42:47 +0000 Received: from u7588a65da6b65f.ant.amazon.com (iad7-ws-svc-lb50-vlan2.amazon.com [10.0.93.210]) by email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w87LfeR9038340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 7 Sep 2018 21:41:42 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 w87Lfchq027245 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 7 Sep 2018 23:41:38 +0200 Received: (from jschoenh@localhost) by u7588a65da6b65f.ant.amazon.com (8.15.2/8.15.2/Submit) id w87LfWT3027226; Fri, 7 Sep 2018 23:41:32 +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 13/60] sched: Remove useless checks for root task-group Date: Fri, 7 Sep 2018 23:40:00 +0200 Message-Id: <20180907214047.26914-14-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 functions sync_throttle() and unregister_fair_sched_group() are called during the creation and destruction of cgroups. They are never called for the root task-group. Remove checks that always yield the same result when operating on non-root task groups. Signed-off-by: Jan H. Schönherr --- kernel/sched/fair.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5d6225aedbfe..5cad364e3a88 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4716,9 +4716,6 @@ static void sync_throttle(struct task_group *tg, int cpu) if (!cfs_bandwidth_used()) return; - if (!tg->parent) - return; - cfs_rq = tg->cfs_rq[cpu]; pcfs_rq = tg->parent->cfs_rq[cpu]; @@ -9881,8 +9878,7 @@ void unregister_fair_sched_group(struct task_group *tg) int cpu; for_each_possible_cpu(cpu) { - if (tg->cfs_rq[cpu]->my_se) - remove_entity_load_avg(tg->cfs_rq[cpu]->my_se); + remove_entity_load_avg(tg->cfs_rq[cpu]->my_se); /* * Only empty task groups can be destroyed; so we can speculatively -- 2.9.3.1.gcba166c.dirty