Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2334364imm; Fri, 7 Sep 2018 14:52:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYz7X40O4bCpPlomKDsKswsclIC6TfVYIbfxp6wewji5ZkGi2he9eScuCq+HQPnYWypsaKp X-Received: by 2002:a17:902:15c5:: with SMTP id a5-v6mr10062424plh.137.1536357164927; Fri, 07 Sep 2018 14:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536357164; cv=none; d=google.com; s=arc-20160816; b=e6PHbHuO7gZOIFqV0NvsBa0f1kiAFoXjarEXfbQPsYexQsS9b8sxTbC1jALqDz2QK5 xczTKy0VwFBWepm/c0JxbsURESdxp5lC5gZKA/e5hiGT0s0VA75doBBVaai0KOwE1fUC AjrUb8SSJnXq5mbd43v0BqWUiOj8opXXt1OtSHGY1/8BeWnafxOodd196TK1WmeFTdHR JHjUVnkrhsZOcY30SZ5iVqavZ0pbJMBUNRLJys44Z4pVUvq4fDneUVpyMEoS1TPbDNZW ITpFObuRGp2XPeOxPHQ2etQeN0XLueurNaa5AAwlf2le12/Yo0iJcqK9jvvfrNWJWWEt ybUQ== 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=fvfRtEHrlTY3jRS58bKRgRg7UL19ocEBacWtm8wP9JU=; b=rjctqi3nndR2tTJek62/bJRK5aDBF8NCowo+83FH1TBsvkpgMmG4me2MgaVqYHStco yh0QbmdXe2dBWp2kNgD3Qi1fzt/OTggeWi+WfqCHalUL7XEe1oKBXTNNgugP2HvzQrPz hOQ1LnFefvqol1YxuhkMhgr3boHr+ohD/32Eu84JlKQJUAS/0wToQ3PDH1laGDHvCqUZ Xaju3Z+/32uueHsGGaocvRgtDSoxhwBxu7wnTfyGhdCaaM5sO3FWpXKndHHOFuE8xIyE YEibNNybp/ZCcL2BVihN/erP9do6oHUWDjLSexcWt3csjTFE99hvCKbboZj3zLDDL9Oc HCbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=sYHtGdSW; 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 d127-v6si9395374pfa.189.2018.09.07.14.52.29; Fri, 07 Sep 2018 14:52:44 -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=sYHtGdSW; 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 S1730784AbeIHC0A (ORCPT + 99 others); Fri, 7 Sep 2018 22:26:00 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:59227 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729910AbeIHCZ7 (ORCPT ); Fri, 7 Sep 2018 22:25:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1536356584; x=1567892584; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fvfRtEHrlTY3jRS58bKRgRg7UL19ocEBacWtm8wP9JU=; b=sYHtGdSWSQ/pCDZ+8Y3b4MLxAtWx4309RwkU7RWg2dTJoayoUAfPoP9A 2Wo8rDI9TMkbpisVPDWgCj5X3TYSu6g/Z9A6Xm6MAT5B1vMtCPjbxcUdV yojAMGhmMf0pDC8xNPAYoAoaLV/kTqS4vfzp81Mz4uSj9st3M2xxoDW2W 4=; X-IronPort-AV: E=Sophos;i="5.53,343,1531785600"; d="scan'208";a="361243269" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-16acd5e0.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2018 21:43:03 +0000 Received: from u7588a65da6b65f.ant.amazon.com (iad7-ws-svc-lb50-vlan2.amazon.com [10.0.93.210]) by email-inbound-relay-1a-16acd5e0.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w87Lgvhc021528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 7 Sep 2018 21:42:59 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 w87Lgt66027812 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 7 Sep 2018 23:42:55 +0200 Received: (from jschoenh@localhost) by u7588a65da6b65f.ant.amazon.com (8.15.2/8.15.2/Submit) id w87Lgsxo027808; Fri, 7 Sep 2018 23:42:54 +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 53/60] cosched: Prevent balancing related functions from crossing hierarchy levels Date: Fri, 7 Sep 2018 23:40:40 +0200 Message-Id: <20180907214047.26914-54-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 Modify update_blocked_averages() and update_cfs_rq_h_load() so that they won't access the next higher hierarchy level, for which they don't hold a lock. This will have to be touched again, when load balancing is made functional. Signed-off-by: Jan H. Schönherr --- kernel/sched/fair.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index bc219c9c3097..210fcd534917 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7686,7 +7686,7 @@ static void update_blocked_averages(int cpu) /* Propagate pending load changes to the parent, if any: */ se = cfs_rq->my_se; - if (se && !skip_blocked_update(se)) + if (se && !is_sd_se(se) && !skip_blocked_update(se)) update_load_avg(cfs_rq_of(se), se, 0); /* @@ -7731,6 +7731,8 @@ static void update_cfs_rq_h_load(struct cfs_rq *cfs_rq) cfs_rq->h_load_next = NULL; for_each_sched_entity(se) { + if (is_sd_se(se)) + break; cfs_rq = cfs_rq_of(se); cfs_rq->h_load_next = se; if (cfs_rq->last_h_load_update == now) -- 2.9.3.1.gcba166c.dirty