Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2334253imm; Fri, 7 Sep 2018 14:52:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdadutUysZAi+Ot4Ep/38DPCSNTrUMeqsBL5RTexrNkz7x0QzU4f8lgqBBusGmK22sbKLuUR X-Received: by 2002:a17:902:32f:: with SMTP id 44-v6mr9925349pld.15.1536357156270; Fri, 07 Sep 2018 14:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536357156; cv=none; d=google.com; s=arc-20160816; b=rn/WsKjmT1zqiMuC65rhU6lROj+q1Ck4bzf+We+4qv1k2XD8sAyJsuSzRgXJee0Pcw IgraU0c0um/SbmAUCcMzidy9stAES043vTqsQR26GDyr+VfSutA8ei4bqgLYgcMwvtMr eVq0YGKGbRaMn2QBRLL7q9WlS/fROY9LsJ0wzTUVglXoheIidlRQIQfuqmKxA54eXdVr ckCcLuZUW+45K/v4e7YFNSEtzFSEHPklKccHsc3gueAjJREAl+pbA3ow3mW3Ku4ovM1g Yu42Z3/3NIbbLJMSltHb+K6Dq1IoiHTPyomrpQ+1YOM2UVaDp4g+svXHb54no0ATcb41 VfEw== 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=aud30RhSUeWi9W7z7vrw6k/jq/YDJbWIpNOBgtiW3to=; b=cgAbxZ6ueolVLzDPQPWUsQDIBA0H7ESQbc6LNlC89hrV1sHWZTMQwpaMJ4OC1dP81i lVto9h9SxvZAmWEh4S3N8znGj0BytRLAm6gS6/gCLlYgbHYEhwXNrNpEqFkaFE6FBUHk Xbhs+0+c+voai+zsqi55univerCPhyNy1AgUUwe9e9n9u5pNiqW7b+Hzx5n4ZGu3xnWL NzRJDc2fuyjhb5Ut4ivkeyDmt5VFnQWkyQLtoZCMxa8DpMRXdU/bXo00PhHuJDyxznLa ARgyLdO40hORZTScdc/Sc2ovnr0R8gRwKcRLDt0bqvJfW9X0SoWhOtboRC6/CLSQcdvp oAxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=qAqpVklG; 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 c5-v6si9088488pgw.343.2018.09.07.14.52.20; Fri, 07 Sep 2018 14:52:36 -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=qAqpVklG; 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 S1730261AbeIHCdZ (ORCPT + 99 others); Fri, 7 Sep 2018 22:33:25 -0400 Received: from smtp-fw-4101.amazon.com ([72.21.198.25]:55298 "EHLO smtp-fw-4101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730623AbeIHCZe (ORCPT ); Fri, 7 Sep 2018 22:25:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1536356558; x=1567892558; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aud30RhSUeWi9W7z7vrw6k/jq/YDJbWIpNOBgtiW3to=; b=qAqpVklGaQSrkl4e3wihkE+TYtCHNPpZzxeLUlW02mbeVB8lur1VEVCz +JR2+GuK7dLlHTM6cuMia/VQELzmCBpYgYLk33d4P4ft6LK2OIS6b3PmE vaU9qROL/WuY72jVTrASR9MNG6y73hSUENro0+/v6V1WOpESyF0a/S2Ka w=; X-IronPort-AV: E=Sophos;i="5.53,343,1531785600"; d="scan'208";a="737530488" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-74cf8b49.us-east-1.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:42:38 +0000 Received: from u7588a65da6b65f.ant.amazon.com (iad7-ws-svc-lb50-vlan2.amazon.com [10.0.93.210]) by email-inbound-relay-1d-74cf8b49.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w87LgW17052671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 7 Sep 2018 21:42:35 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 w87LgQDp027587 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 7 Sep 2018 23:42:26 +0200 Received: (from jschoenh@localhost) by u7588a65da6b65f.ant.amazon.com (8.15.2/8.15.2/Submit) id w87LgP6L027586; Fri, 7 Sep 2018 23:42:25 +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 37/60] cosched: Use hrq_of() for (indirect calls to) ___update_load_sum() Date: Fri, 7 Sep 2018 23:40:24 +0200 Message-Id: <20180907214047.26914-38-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 cpu argument supplied to all callers of ___update_load_sum() is used in accumulate_sum() to scale load values according to the CPU capacity. While we should think about that at some point, it is out-of-scope for now. Also, it does not matter on homogeneous system topologies. Update all callers to use hrq_of() instead of rq_of() to derive the cpu argument. Signed-off-by: Jan H. Schönherr --- kernel/sched/fair.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index fde1c4ba4bb4..a2945355f823 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3114,7 +3114,7 @@ void set_task_rq_fair(struct sched_entity *se, p_last_update_time = prev->avg.last_update_time; n_last_update_time = next->avg.last_update_time; #endif - __update_load_avg_blocked_se(p_last_update_time, cpu_of(rq_of(prev)), se); + __update_load_avg_blocked_se(p_last_update_time, cpu_of(hrq_of(prev)), se); se->avg.last_update_time = n_last_update_time; } @@ -3397,7 +3397,7 @@ update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq) decayed = 1; } - decayed |= __update_load_avg_cfs_rq(now, cpu_of(rq_of(cfs_rq)), cfs_rq); + decayed |= __update_load_avg_cfs_rq(now, cpu_of(hrq_of(cfs_rq)), cfs_rq); #ifndef CONFIG_64BIT smp_wmb(); @@ -3487,7 +3487,7 @@ static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s static inline void update_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) { u64 now = cfs_rq_clock_task(cfs_rq); - struct rq *rq = rq_of(cfs_rq); + struct rq *rq = hrq_of(cfs_rq); int cpu = cpu_of(rq); int decayed; @@ -3548,7 +3548,7 @@ void sync_entity_load_avg(struct sched_entity *se) u64 last_update_time; last_update_time = cfs_rq_last_update_time(cfs_rq); - __update_load_avg_blocked_se(last_update_time, cpu_of(rq_of(cfs_rq)), se); + __update_load_avg_blocked_se(last_update_time, cpu_of(hrq_of(cfs_rq)), se); } /* -- 2.9.3.1.gcba166c.dirty