Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4801018pxj; Wed, 12 May 2021 13:38:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnMkJ8jRw+O7Il8R/oc648GfppVjiRsUfI+HxG32icsDYn5J+tJ62ypM3ebv3Gxp03pJop X-Received: by 2002:aa7:c789:: with SMTP id n9mr46497552eds.352.1620851880092; Wed, 12 May 2021 13:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620851880; cv=none; d=google.com; s=arc-20160816; b=Acc5JQVDfkCepQcRvtAFsRVFrS35NifoyW6XjEE1ftEvAEF8EeqUS4HkKzBycXuEUI ecDOOlJZ24hLEDs6QF2+Ac3EWPPuajpQqby20CR+laRz4pE5URZN3IC1DertxkPNTCV7 aipC14rs/Cbmoe7/95hqNvSobR7N9ZTrsRYXNs0Bu0YwVugb9Y4drNSQbAyTQZPgUWow wmCOt3C7k0a94kAihGWCdzLd66LPu0EjIUoXyYZaApLTq7uQumwayLA5xIo0jkrt6K+f RMYR9XUTdh2cooH8T7L7Qh7k2/r1YiNKVzt8Y0UhZ8sDk56/pMCiIlgYXIeCmoqlvv/B Or+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=j3GfjciUuHctw4hx+yJNNp9+xYEKLhuvs6D678TbFDQ=; b=bCuD5rHRwsbkCKvuAVFVueXyPWSTgTVgpLqMoKGvXgqGOWrQA3UzqY1f0ra+rG3MHk 9TV9XkffvJA2Z3NTj5HAgx4CtfpMFp9CKaS3ZzItuiEa66se4h8wUZNH5fChvLfYXxsH tANGZ3w+slqFIdpSY+kzLiZkLjQTftjf3B5gujp8AWKZ5Tsds3dD8pEVGjdzMpwXa/7N x7TkpgkIIRA3S4sJvU89NRrDzbakuoj9wf2sNSra09YkE/vdakaHcVnM+h9SOvAtzNI4 wNjcFO4Agm9NTnhxC4x4YvsLqf7/26OH6Uja0ldAUwPyOLuLrcKoDA3zcvYfWQZsg3F0 mzhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Zzh6YlGk; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="PSY/0JFP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si696055ejd.10.2021.05.12.13.36.40; Wed, 12 May 2021 13:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Zzh6YlGk; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="PSY/0JFP"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386535AbhELUVT (ORCPT + 99 others); Wed, 12 May 2021 16:21:19 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:53640 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238748AbhELUDH (ORCPT ); Wed, 12 May 2021 16:03:07 -0400 Date: Wed, 12 May 2021 20:01:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1620849706; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j3GfjciUuHctw4hx+yJNNp9+xYEKLhuvs6D678TbFDQ=; b=Zzh6YlGksa7d5QI43+plg+5F2RQiPmtaLRFCHFGJwYESeR/iUMHsA3xPevbBC7RtY71jvt UzYHUNAoCpRpDuI7nQBcl4s2MrNn8cEtdjfeBVVCiEXPLH4P6mIqKJQDsjffvF3O2KoYaz g7mwcEIOUcuuABB/ddl7Aaclo1pMlNprHFObx0jastnTOgDE4DDZF4RyLR95ro0Pq+XCBu YdBWaHu7bdBIfcpQel62pAFobiAgnSAnSwi0tzO8Nja6a0wUU29huk0nozQ/p31wHDqeBp 9XlkHSdgksrkHAGfGXv3TJKkMui958pAr9S6scyy7aq2b999OMn27EIVxvIZOw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1620849706; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j3GfjciUuHctw4hx+yJNNp9+xYEKLhuvs6D678TbFDQ=; b=PSY/0JFPDL6B7LDD3JlJQ9Oe3+dUagYT9p1w5H7hpiWdPJi9xjP2KazRFjvqoQmMNxhu0B sLtLWF7/rP+QW6Cw== From: "tip-bot2 for Alexey Dobriyan" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched: Make multiple runqueue task counters 32-bit Cc: Alexey Dobriyan , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210422200228.1423391-4-adobriyan@gmail.com> References: <20210422200228.1423391-4-adobriyan@gmail.com> MIME-Version: 1.0 Message-ID: <162084970568.29796.11631457054332313096.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: e6fe3f422be128b7d65de607f6ae67bedc55f0ca Gitweb: https://git.kernel.org/tip/e6fe3f422be128b7d65de607f6ae67bedc55f0ca Author: Alexey Dobriyan AuthorDate: Thu, 22 Apr 2021 23:02:28 +03:00 Committer: Ingo Molnar CommitterDate: Wed, 12 May 2021 21:34:17 +02:00 sched: Make multiple runqueue task counters 32-bit Make: struct dl_rq::dl_nr_migratory struct dl_rq::dl_nr_running struct rt_rq::rt_nr_boosted struct rt_rq::rt_nr_migratory struct rt_rq::rt_nr_total struct rq::nr_uninterruptible 32-bit. If total number of tasks can't exceed 2**32 (and less due to futex pid limits), then per-runqueue counters can't as well. This patchset has been sponsored by REX Prefix Eradication Society. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210422200228.1423391-4-adobriyan@gmail.com --- kernel/sched/loadavg.c | 2 +- kernel/sched/sched.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/sched/loadavg.c b/kernel/sched/loadavg.c index 1c79896..954b229 100644 --- a/kernel/sched/loadavg.c +++ b/kernel/sched/loadavg.c @@ -81,7 +81,7 @@ long calc_load_fold_active(struct rq *this_rq, long adjust) long nr_active, delta = 0; nr_active = this_rq->nr_running - adjust; - nr_active += (long)this_rq->nr_uninterruptible; + nr_active += (int)this_rq->nr_uninterruptible; if (nr_active != this_rq->calc_load_active) { delta = nr_active - this_rq->calc_load_active; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 904c52b..8f0194c 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -636,8 +636,8 @@ struct rt_rq { } highest_prio; #endif #ifdef CONFIG_SMP - unsigned long rt_nr_migratory; - unsigned long rt_nr_total; + unsigned int rt_nr_migratory; + unsigned int rt_nr_total; int overloaded; struct plist_head pushable_tasks; @@ -651,7 +651,7 @@ struct rt_rq { raw_spinlock_t rt_runtime_lock; #ifdef CONFIG_RT_GROUP_SCHED - unsigned long rt_nr_boosted; + unsigned int rt_nr_boosted; struct rq *rq; struct task_group *tg; @@ -668,7 +668,7 @@ struct dl_rq { /* runqueue is an rbtree, ordered by deadline */ struct rb_root_cached root; - unsigned long dl_nr_running; + unsigned int dl_nr_running; #ifdef CONFIG_SMP /* @@ -682,7 +682,7 @@ struct dl_rq { u64 next; } earliest_dl; - unsigned long dl_nr_migratory; + unsigned int dl_nr_migratory; int overloaded; /* @@ -960,7 +960,7 @@ struct rq { * one CPU and if it got migrated afterwards it may decrease * it on another CPU. Always updated under the runqueue lock: */ - unsigned long nr_uninterruptible; + unsigned int nr_uninterruptible; struct task_struct __rcu *curr; struct task_struct *idle;