From nobody Sun Feb 8 08:42:43 2026 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E07F855E4A for ; Fri, 8 Mar 2024 10:59:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895559; cv=none; b=YCgv0EM3m3DqPr1HHJ01zX3Fn6/9D3JM30kJnISNQMkcI1aVzG8gQIA+iLpHMH1M1mw2ndWWOK5UGx/JYn9rEINRnh17/hzxZRc82MSVLBi/b6+yVjVZ3W6wZPkGCHfw/fXAAsGa673Y+YJiDDN5QRB/LKJSvY+adVtwaWARAzs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895559; c=relaxed/simple; bh=P89bbgCmoIwRYPsfqIuTxmk7ilKR2Yxvp8a3Scsu+m8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EAKUDmxsVmqZSEpKI0xPqcr3ObRi9YxxJmaMwGfjWy5Im5fsFDXBv0sB406G/0cqR1Ataz0eFA9Vq3ww7XiWxSS9VyiL+qyRNgDaqQ7g5Pkw+hxlAPrU5iZGqQPFk8VZeLKP2zoIlcEbsA+S9h08lLhv28p1kdthph1sPg78JsM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cPYPwYkW; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cPYPwYkW" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5132010e5d1so2677991e87.0 for ; Fri, 08 Mar 2024 02:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895556; x=1710500356; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=geif82Q8kuw7lCFHvfmZ/kVxJJq75wsWf5PRSM8TZn8=; b=cPYPwYkWJtxuGRak0smxx5lwBKtUuo3oVvPPCS8tWwhMhwwB1xqICEqWRoXoKFkKtg i4NvI2mg7y3jRykCr5ONP5LQhCV5K+MiuWMsLXCsPTba3DQY9c/DBd+KU/7MsFiWCF4M 7fcnAejkHKP34MgQhY6BDeNfLNZFdRZJFRmnWixi+7X+w+RFQLx9pKpRfaQMoAQ2NYYf CnOossK7SV7qjFE+2QSJfEFit3J2H4rcbJ6FseO5Hi4DsjxhSQlqc3GuWQ5PiVjuzioU R3BOi8AdKp08CzqbA9kWYkxQLaNuSx6AYYJPrhFmKlb8lCI8oh38Ok71TO5wcZc1QF9O QiGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895556; x=1710500356; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=geif82Q8kuw7lCFHvfmZ/kVxJJq75wsWf5PRSM8TZn8=; b=gh/dTB2Bu1IpPWXrRF/z9VqFevcahpgMs0qlczksurFWQP+x0w+Bs62lwplt+STrFr 2+rQg6xaRMPoj4JKHSWAIaWLsAy5GH5RiEQvzyfpsVA3ITDK8fdK2KOqZkvrBQ8KCSPE NrE084rDUnAPM2ECX0P48kGE04h/xVc4LA/T3spx+FBjeZV8SXhwQj8NKA/IIuhFY5AI 39mPpr7T1d6ZkX3vbIgYmoXaD7qyUcpDxzLcEP/Inhoduy9sOWcMz+yrs+XS9ZF2b+xY vPdbgyDKx5YEX+Sr5hJckVRwt6BoN/fT9pj22+KRMpq9mg9O6yGW8KfLZb8dPJYFHP7J rFhQ== X-Gm-Message-State: AOJu0YzM97OCh00vbBI125p/1O2Jie2iMsMyHvjFijuTZApqPUjYtxqM ZP9juVis19YJxrwZR8+538CJXfae0CZVFxiyp5BMqbfbl78LFwzHGhBecgxBntg= X-Google-Smtp-Source: AGHT+IHQ+tYPIIVHxAV8VyCd6JmA99ARRA94O1Vw78plqTCfN0Zb8vH25BaOZ/8g6jw/oxzdc2fpyA== X-Received: by 2002:a05:6512:e94:b0:512:da6d:23aa with SMTP id bi20-20020a0565120e9400b00512da6d23aamr3716925lfb.67.1709895555429; Fri, 08 Mar 2024 02:59:15 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:14 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 01/10] sched/balancing: Switch the 'DEFINE_SPINLOCK(balancing)' spinlock into an 'atomic_t sched_balance_running' flag Date: Fri, 8 Mar 2024 11:58:52 +0100 Message-Id: <20240308105901.1096078-2-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The 'balancing' spinlock added in: 08c183f31bdb ("[PATCH] sched: add option to serialize load balancing") ... is taken when the SD_SERIALIZE flag is set in a domain, but in reality = it is a glorified global atomic flag serializing the load-balancing of those domains. It doesn't have any explicit locking semantics per se: we just spin_trylock() it. Turn it into a ... global atomic flag. This makes it more clear what is going on here, and reduces overhead and code size a bit: # kernel/sched/fair.o: [x86-64 defconfig] text data bss dec hex filename 60730 2721 104 63555 f843 fair.o.before 60718 2721 104 63543 f837 fair.o.after Also document the flag a bit. No change in functionality intended. Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde Cc: Vincent Guittot --- kernel/sched/fair.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6a16129f9a5c..2ef89b36aed1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -11633,7 +11633,20 @@ static int active_load_balance_cpu_stop(void *data) return 0; } =20 -static DEFINE_SPINLOCK(balancing); +/* + * This flag serializes load-balancing passes over large domains + * (above the NODE topology level) - only one load-balancing instance + * may run at a time, to reduce overhead on very large systems with + * lots of CPUs and large NUMA distances. + * + * - Note that load-balancing passes triggered while another one + * is executing are skipped and not re-tried. + * + * - Also note that this does not serialize rebalance_domains() + * execution, as non-SD_SERIALIZE domains will still be + * load-balanced in parallel. + */ +static atomic_t sched_balance_running =3D ATOMIC_INIT(0); =20 /* * Scale the max load_balance interval with the number of CPUs in the syst= em. @@ -11711,7 +11724,7 @@ static void rebalance_domains(struct rq *rq, enum c= pu_idle_type idle) =20 need_serialize =3D sd->flags & SD_SERIALIZE; if (need_serialize) { - if (!spin_trylock(&balancing)) + if (atomic_cmpxchg_acquire(&sched_balance_running, 0, 1)) goto out; } =20 @@ -11729,7 +11742,7 @@ static void rebalance_domains(struct rq *rq, enum c= pu_idle_type idle) interval =3D get_sd_balance_interval(sd, busy); } if (need_serialize) - spin_unlock(&balancing); + atomic_set_release(&sched_balance_running, 0); out: if (time_after(next_balance, sd->last_balance + interval)) { next_balance =3D sd->last_balance + interval; --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6007655E5A for ; Fri, 8 Mar 2024 10:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895560; cv=none; b=pEGknppArSd4lGkfHhkXdjb/bZja/jF8lD9MqfyjASaGDxE6tJg/SwSNSUG4HI3d5nWjgIkxX0NG9SZrP4prFaMOqFBYsUMq0a6wY0Y0edPssIzp3rGhwi5c+4HTpyA1ECGoClAxxOWbOdMGUGhljqSvORxTW6fFT0ziZu5u/7U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895560; c=relaxed/simple; bh=JagAYaWf++ODRpywnfop8bzRaSlCWa+JwvJsgilSydE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DY+vAqNBg7gO9qFcr5WxMCPCaOJBNU6xgBkgLiT4iZMsKesk1o/UCpBBxogpCo9LLV3ysUZBWqJC4GdQCRtPSycodFrVJfJodRJdfX6VhZ7cEbpnr5UjEg75WeAnk1rzNWiFOozFhzOMW5Ig4Mbo4ZmMZVV+2+6nym53dVdvo1s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S2o4lpIO; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S2o4lpIO" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4131b27cda2so2146665e9.0 for ; Fri, 08 Mar 2024 02:59:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895557; x=1710500357; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=kCECdkdBNez11DlTdqaYyAJcVrugZwGDKkCobhbfy9A=; b=S2o4lpIOocwvHH4mucVu7cILQntoF6sZ7rRA0CzjUyqnhqTjPSz5D4hxwZ2TJFylQz KfMXFtNe21uXAKiqVhmlA+5nhAE1FUH7iqqpVxUIXK6v+RO7xDo4AElHr6Cu9olGEwQ/ GERlSxWvxcPpGBkUQkNJ3w+AJYSwoCjAHUh2B3B6Rffi/SERIREE+Iq9nFy9F+vKDgpK X1y+6GePnQlxinCsQIbCX3q3t/ekmI8KJmbPGxfhhv8P5iL5YaYMNl6dpBJe7mNI4SP1 63S5WOUzRXXAfLI3CsaU1TqwECS2Jnk8iaZGNgbv3g2oUYWMMS+UsjKKVo1D83HOoj5Q ab5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895557; x=1710500357; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kCECdkdBNez11DlTdqaYyAJcVrugZwGDKkCobhbfy9A=; b=Z7/LtDbrysFuX04/P1WFZhJxUOdj1849tYmAHg2lzwUotfWp2DgK4ozhQbEz8iMoDz r+iQN7BAl9xMDC4wmvLHkXvazl7KzIZ6PwKH+ia6Z7zltTd/wnA1s2NlVVakXRXDebv6 /Nfr+r4Dg2fEtrakaZZl80rb8Xe6ELGxagWF2e6EVsX++M2vebKVmzHs4DHI4E6Gov19 aSa7vIE1V9U/NWVEkDFtvqVS+OCD2BIt05Pj8CAwDxVlL/gokteHDrtPkcZ+1O3zzseV 6MypNgu9snJQVCdaPewrWUmdWhokGw7GFjwIqQPm1OcBUD5VCT1YxF8O9E77x3iPJpuL aCWw== X-Gm-Message-State: AOJu0YwIvUHwJUVq4UpblVfVWklNro8mGjNgMmXX7JoIFEbpzWUwO7fz AqkU28uW4Ek9eLBes9ZUgK1jp1m6aY/84WfOVxMh4vGzU+DlK4Sp8y6cLKaw3sw= X-Google-Smtp-Source: AGHT+IERVUUUBh21Wd3Ab6xPzr2OYcduLqq4LxXwVQg6KjxFXWFCWz6L4f8+e7khx35szexroy9U+Q== X-Received: by 2002:a05:600c:1f13:b0:413:1ae3:6acb with SMTP id bd19-20020a05600c1f1300b004131ae36acbmr751599wmb.26.1709895556402; Fri, 08 Mar 2024 02:59:16 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:15 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 02/10] sched/balancing: Remove reliance on 'enum cpu_idle_type' ordering when iterating [CPU_MAX_IDLE_TYPES] arrays in show_schedstat() Date: Fri, 8 Mar 2024 11:58:53 +0100 Message-Id: <20240308105901.1096078-3-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Shrikanth Hegde show_schedstat() output breaks and doesn't print all entries if the ordering of the definitions in 'enum cpu_idle_type' is changed, because show_schedstat() assumes that 'CPU_IDLE' is 0. Fix it before we change the definition order & values. [ mingo: Added changelog. ] Signed-off-by: Shrikanth Hegde Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Valentin Schneider Reviewed-by: Vincent Guittot --- kernel/sched/stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c index 857f837f52cb..85277953cc72 100644 --- a/kernel/sched/stats.c +++ b/kernel/sched/stats.c @@ -150,8 +150,7 @@ static int show_schedstat(struct seq_file *seq, void *v) =20 seq_printf(seq, "domain%d %*pb", dcount++, cpumask_pr_args(sched_domain_span(sd))); - for (itype =3D CPU_IDLE; itype < CPU_MAX_IDLE_TYPES; - itype++) { + for (itype =3D 0; itype < CPU_MAX_IDLE_TYPES; itype++) { seq_printf(seq, " %u %u %u %u %u %u %u %u", sd->lb_count[itype], sd->lb_balanced[itype], --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D91756444 for ; Fri, 8 Mar 2024 10:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895561; cv=none; b=bPOj/77rhrI1VYdYgjwI5cGRc/ScpKSIq745vSoOrZV2krCjgXvnPADJ5SKHdHy3cy0W9KGIVZ+1C+3PSDS81MCAeBSu/ChsFNfOvbivZxN1Q3metab8i7jzwy54+MIxVXmQ4bM9bTDjaNodWNrekK01ZSp7UIJVcSYZHydhPW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895561; c=relaxed/simple; bh=IsD9VLCgHWQxmjX5aIcgnoL5USA9pg5IV19yprT6n3g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sTscH0rvrXSbEqZpmsw+04k7JVdYfbHI71QHQcJQzBO3XJC1i8smZaaTs3e/5lfnxtTUEtHDz8CXbOU2ZRdiMziUeSCbS42SHznoW6H2rtD9wEoqzKzeNi4ubSUVgjA24xTjA3IX7JfMzLcXF8OMDPTIZZ69GCna6AvHlFU/gxk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ytr9j2hu; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ytr9j2hu" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-512bde3d197so1857758e87.0 for ; Fri, 08 Mar 2024 02:59:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895558; x=1710500358; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=tA33SUK/7qHtkaprcc+Lb3dKaC38v8lEQCVUVbmzndg=; b=Ytr9j2hu1lL3BPQZYpNoQ/WuHWMEx74Otfd2EcJzhjZPCbzKq0UQGS3gKm0fCQDhp4 7zBY2lrkVSRSUKctHeGmHMZ8t0wx0EDxcXgD6eUWiZ59ecmI8UL/t6c0aVPqGayDyPqH xy0QRf/5loyVJBgWD04d4W6n9ZkGcQGqEEOB/hIb+fPqEI8VsDBFI7nBT6WWkde76NC9 FGJxPA6IVGJMTO1ekganvfvXZlWAhwZXqK6Ycekf82B8Br/5b4MBl13h6ARGlXlQOMwb JUeK2O6vbnD8i0vlri/PAlGIqvxf253a77SXmA2di4mOogseuttzhuUo7RtGy5ffjyyI LMug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895558; x=1710500358; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tA33SUK/7qHtkaprcc+Lb3dKaC38v8lEQCVUVbmzndg=; b=FKUbEe8D5dsdEAXvcDDkHH39eaT+k3+iB+0XT7IWuFmW5smAlEbOWafUyCdFv0n2eZ kpiMXUaohbwj7c1IqCKYLsH7tI8aztlA7Q5bMcXDKj+kAOxix99R1vD+crQa1p2nUYpL 2pjwQ7TZIfrbwxl0ZUpUpbNAwWcmPiq+csY/27+PBI5oN/waxvUfddf/1ZBgV1Yi04xM PYc+cjfcDzahQ6OOGEyi9rgLeZc0F9MdvQo1ciyvbcJvqW6fVLwQRaVzB8JBNpcI3AYA KH+YUJqtOLpBalOgq8Vlg3RESRQHKvlc7AD6B3ZyuYLjzW346TuXia8QHFt1WFF0YLuH 2tvA== X-Gm-Message-State: AOJu0Ywo6SitT+eh12QzMyw2ZrIkLpvPilgVfgaaQM75mXfn1HxTe7E6 DPgvMyny44Zw9eoTPzishjsZ0YfjwIuWpmB/ZSIqeBnBTDEI1OLsGpU38GlN42w= X-Google-Smtp-Source: AGHT+IFhttX7Kb3BJmXCqGr/TBUEKG/Yhv7fowEExAZuQPoHlQH0/EpWu9Ud1PLDoT73ZIylJYMPSw== X-Received: by 2002:a19:ae0c:0:b0:513:2c92:4c95 with SMTP id f12-20020a19ae0c000000b005132c924c95mr3018872lfc.63.1709895557428; Fri, 08 Mar 2024 02:59:17 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:16 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 03/10] sched/balancing: Change 'enum cpu_idle_type' to have more natural definitions Date: Fri, 8 Mar 2024 11:58:54 +0100 Message-Id: <20240308105901.1096078-4-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The cpu_idle_type enum has the confusingly inverted property that 'not idle' is 1, and 'idle' is '0'. This resulted in a number of unnecessary complications in the code. Reverse the order, remove the CPU_NOT_IDLE type, and convert all code to a natural boolean form. It's much more readable: - enum cpu_idle_type idle =3D this_rq->idle_balance ? - CPU_IDLE : CPU_NOT_IDLE; - + enum cpu_idle_type idle =3D this_rq->idle_balance; -------------------------------- - if (env->idle =3D=3D CPU_NOT_IDLE || !busiest->sum_nr_running) + if (!env->idle || !busiest->sum_nr_running) -------------------------------- And gets rid of the double negation in these usages: - if (env->idle !=3D CPU_NOT_IDLE && env->src_rq->nr_runnin= g <=3D 1) + if (env->idle && env->src_rq->nr_running <=3D 1) Furthermore, this makes code much more obvious where there's differentiation between CPU_IDLE and CPU_NEWLY_IDLE. Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Reviewed-by: Vincent Guittot Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde --- include/linux/sched/idle.h | 2 +- kernel/sched/fair.c | 27 ++++++++++++--------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/include/linux/sched/idle.h b/include/linux/sched/idle.h index 478084f9105e..e670ac282333 100644 --- a/include/linux/sched/idle.h +++ b/include/linux/sched/idle.h @@ -5,8 +5,8 @@ #include =20 enum cpu_idle_type { + __CPU_NOT_IDLE =3D 0, CPU_IDLE, - CPU_NOT_IDLE, CPU_NEWLY_IDLE, CPU_MAX_IDLE_TYPES }; diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2ef89b36aed1..3a510cf1fb00 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9070,7 +9070,7 @@ static int detach_tasks(struct lb_env *env) * We don't want to steal all, otherwise we may be treated likewise, * which could at worst lead to a livelock crash. */ - if (env->idle !=3D CPU_NOT_IDLE && env->src_rq->nr_running <=3D 1) + if (env->idle && env->src_rq->nr_running <=3D 1) break; =20 env->loop++; @@ -9803,7 +9803,7 @@ static inline bool smt_vs_nonsmt_groups(struct sched_= group *sg1, static inline bool smt_balance(struct lb_env *env, struct sg_lb_stats *sgs, struct sched_group *group) { - if (env->idle =3D=3D CPU_NOT_IDLE) + if (!env->idle) return false; =20 /* @@ -9827,7 +9827,7 @@ static inline long sibling_imbalance(struct lb_env *e= nv, int ncores_busiest, ncores_local; long imbalance; =20 - if (env->idle =3D=3D CPU_NOT_IDLE || !busiest->sum_nr_running) + if (!env->idle || !busiest->sum_nr_running) return 0; =20 ncores_busiest =3D sds->busiest->cores; @@ -9927,8 +9927,7 @@ static inline void update_sg_lb_stats(struct lb_env *= env, sgs->group_misfit_task_load =3D rq->misfit_task_load; *sg_status |=3D SG_OVERLOAD; } - } else if ((env->idle !=3D CPU_NOT_IDLE) && - sched_reduced_capacity(rq, env->sd)) { + } else if (env->idle && sched_reduced_capacity(rq, env->sd)) { /* Check for a task running on a CPU with reduced capacity */ if (sgs->group_misfit_task_load < load) sgs->group_misfit_task_load =3D load; @@ -9940,7 +9939,7 @@ static inline void update_sg_lb_stats(struct lb_env *= env, sgs->group_weight =3D group->group_weight; =20 /* Check if dst CPU is idle and preferred to this group */ - if (!local_group && env->idle !=3D CPU_NOT_IDLE && sgs->sum_h_nr_running = && + if (!local_group && env->idle && sgs->sum_h_nr_running && sched_group_asym(env, sgs, group)) sgs->group_asym_packing =3D 1; =20 @@ -10698,7 +10697,7 @@ static inline void calculate_imbalance(struct lb_en= v *env, struct sd_lb_stats *s * waiting task in this overloaded busiest group. Let's * try to pull it. */ - if (env->idle !=3D CPU_NOT_IDLE && env->imbalance =3D=3D 0) { + if (env->idle && env->imbalance =3D=3D 0) { env->migration_type =3D migrate_task; env->imbalance =3D 1; } @@ -10913,7 +10912,7 @@ static struct sched_group *find_busiest_group(struc= t lb_env *env) goto force_balance; =20 if (busiest->group_type !=3D group_overloaded) { - if (env->idle =3D=3D CPU_NOT_IDLE) { + if (!env->idle) { /* * If the busiest group is not overloaded (and as a * result the local one too) but this CPU is already @@ -11121,7 +11120,7 @@ asym_active_balance(struct lb_env *env) * the lower priority @env::dst_cpu help it. Do not follow * CPU priority. */ - return env->idle !=3D CPU_NOT_IDLE && sched_use_asym_prio(env->sd, env->d= st_cpu) && + return env->idle && sched_use_asym_prio(env->sd, env->dst_cpu) && (sched_asym_prefer(env->dst_cpu, env->src_cpu) || !sched_use_asym_prio(env->sd, env->src_cpu)); } @@ -11159,7 +11158,7 @@ static int need_active_balance(struct lb_env *env) * because of other sched_class or IRQs if more capacity stays * available on dst_cpu. */ - if ((env->idle !=3D CPU_NOT_IDLE) && + if (env->idle && (env->src_rq->cfs.h_nr_running =3D=3D 1)) { if ((check_cpu_capacity(env->src_rq, sd)) && (capacity_of(env->src_cpu)*sd->imbalance_pct < capacity_of(env->dst_= cpu)*100)) @@ -11735,8 +11734,8 @@ static void rebalance_domains(struct rq *rq, enum c= pu_idle_type idle) * env->dst_cpu, so we can't know our idle * state even if we migrated tasks. Update it. */ - idle =3D idle_cpu(cpu) ? CPU_IDLE : CPU_NOT_IDLE; - busy =3D idle !=3D CPU_IDLE && !sched_idle_cpu(cpu); + idle =3D idle_cpu(cpu); + busy =3D !idle && !sched_idle_cpu(cpu); } sd->last_balance =3D jiffies; interval =3D get_sd_balance_interval(sd, busy); @@ -12416,9 +12415,7 @@ static int newidle_balance(struct rq *this_rq, stru= ct rq_flags *rf) static __latent_entropy void run_rebalance_domains(struct softirq_action *= h) { struct rq *this_rq =3D this_rq(); - enum cpu_idle_type idle =3D this_rq->idle_balance ? - CPU_IDLE : CPU_NOT_IDLE; - + enum cpu_idle_type idle =3D this_rq->idle_balance; /* * If this CPU has a pending nohz_balance_kick, then do the * balancing on behalf of the other idle CPUs whose ticks are --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3E6F55E7C for ; Fri, 8 Mar 2024 10:59:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895562; cv=none; b=KJmx4EJ51RhhiEfoexwuGwfNSG/+My3wjGlfUZIvAo23U0dZ3h2/XCbaAa9fT3hZ5+DGujB0jeyp88eDuu6RjBMVxH+e30+OG3OCwqq+1AIZX1uGTtJOn0XkPS87WkkfLFJy7S2dLPr3iSjpGZ/W+Ek6oF4zMGJfWwYvONBAG6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895562; c=relaxed/simple; bh=krbxrxofvU3bNtV7aKPXLRF9gzUuYzAL8MX80bNIYPU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m0skH0tElI/BTCSQ4VvszHydVfefYemL7gNNTYv9RSJzxxRQ6Xr0zINxDKSDjSYqPyOjKRakCVkKDRgPqIz1UGNK8r8tNH9LCWsphyrLt4PFn8QhS2jsoDGCI72JKwoMXQeYIQe+HlRoQP6b4LxZ8oB4te+1vfrfweXYYW7Tudc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IObQntos; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IObQntos" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5134d7e16a8so1722436e87.3 for ; Fri, 08 Mar 2024 02:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895559; x=1710500359; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=C6OlRhqx5GPQQyNuVhSp2D6im2dbAlAubZWjZjVrs0g=; b=IObQntos4zSlSpz33iqmTIo/SexIRY7J9cVs8IILs99GHpBrY5j540Rp3SbIMGK2vg tQ7UnvGyq3dZtzJpGu6H5khFgodrvJybGOyUBV4Q7B4TVBan63I2jasWzd0uacIU4DR1 uxO5hlIK3tbH6CxvX7kpJouG59FiblrFc4Lm6d9nRxvl3H2955q/uDMTnNzqyNDmukK/ +Wstli6TxJfYQaPAIfS2fANb52gIH5+BlhuErCPMzqGzsyAlTKFPtcCR5vydQ71PU3YR w1H1vb+RLqzSgy7ACYLMkvQ2LE1LYrqFMhGrRQ+XkxzOrD1T01tKDG+rmObqo5Zkzqnp nrTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895559; x=1710500359; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=C6OlRhqx5GPQQyNuVhSp2D6im2dbAlAubZWjZjVrs0g=; b=MbgJZpxXpF2hMen0DI4nJ8Oy0hg1L0ZeeoMyyeAo2eaOel36WFU5kI8bIbOv1dKybr HVGgpYNmRsZqfo9/L0dIWsblMN3U+uVQG0lAMbrRZcUMCXYTg4gJ76CP4wkj5sRqlzPu BlkQDcLb6VLvH1iTI7a1AoZtuVZ64kljM03KQirTq+ztZolJ8iOigehpQkSOCMXxevPV BbYd32U/WCX202sH5KtPPPRLTAGfnO5uDWl46QQSklJfr1RCETBBV2wfl5Bw2l/wXpuF gqPNvOE4jwbYQ7jIct1UR/hyIoUwAorBdDKt31hwkXWR3OG4OwmU+ZyvTPPflrPGHsfi dtxQ== X-Gm-Message-State: AOJu0Yyy6Dfp2EE2gSnd31DxnJQqzep9v1dumubavezay95vBUZnrFOd yAfIHmaVYEBytFiUECXwOO8Z3LQDNtTyvkxKmr5oh/KjrTE4srTM1Stxucj3Qgs= X-Google-Smtp-Source: AGHT+IGBAIlaoj7aRO2Usvo2XvWB9spb15J7P0KvkzOFSOxIE2BZ3lhAv5Rwpi7GfZCMX3uow8kflQ== X-Received: by 2002:ac2:4d8b:0:b0:513:351e:3204 with SMTP id g11-20020ac24d8b000000b00513351e3204mr3533270lfe.26.1709895558500; Fri, 08 Mar 2024 02:59:18 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:17 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 04/10] sched/debug: Increase SCHEDSTAT_VERSION to 16 Date: Fri, 8 Mar 2024 11:58:55 +0100 Message-Id: <20240308105901.1096078-5-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" We changed the order of definitions within 'enum cpu_idle_type', which changed the order of [CPU_MAX_IDLE_TYPES] columns in show_schedstat(). Suggested-by: Shrikanth Hegde Signed-off-by: Ingo Molnar Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde Cc: Valentin Schneider Cc: Vincent Guittot --- kernel/sched/stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c index 85277953cc72..78e48f5426ee 100644 --- a/kernel/sched/stats.c +++ b/kernel/sched/stats.c @@ -113,7 +113,7 @@ void __update_stats_enqueue_sleeper(struct rq *rq, stru= ct task_struct *p, * Bump this up when changing the output format or the meaning of an exist= ing * format, so that tools can adapt (or abort) */ -#define SCHEDSTAT_VERSION 15 +#define SCHEDSTAT_VERSION 16 =20 static int show_schedstat(struct seq_file *seq, void *v) { --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39B2E56748 for ; Fri, 8 Mar 2024 10:59:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895562; cv=none; b=L8bKfoeIS25izTfRPydVmwid/j9Aqc/dckqHJOsR8AqQN+QKUAvz2wSA5LF8HQc2qNesHzoLMau2aqGSR54f7/sv6V2ra6DDli7hOfaX81JB1S1rv0LaOrpwd1MvnVdYglmro/RFHaA/d88rw5cBdKYitqzweVt5xzc/i8Lvs2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895562; c=relaxed/simple; bh=41nGgChHRVV8YN0N5ipR/hs3W4BH/wXLKrpIYsjfa0s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q74GG8URACaHdl4xjTXswgaDzUctCnbnaYSyaVeKUcHEGccQ+ivy/z10m0yIvWsl+6KMx7acK85UqEytm1bOOWpxSUIIzrswz5RGD0RlEtBHwtPBhaYpns9cRJ9/OnOV1mf0hffzgC7UeJTVdwfERj20UF+uAayr0db+qQdCckI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MKMdhW92; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MKMdhW92" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-41312adc3deso10654555e9.3 for ; Fri, 08 Mar 2024 02:59:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895559; x=1710500359; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=Q17gl107RYT0eMy0dwx+fE6K3UqQeF/uj+kx0/lTA7k=; b=MKMdhW92DhaXpmxsGl5QbGf0mkKZCysO6i/y7ORMkJCsWhmbwxgiaTsGk+S9oxXzDZ Ym8Nhr53ckIYEgX2BMPZa1sXoImdr90BNDs5JePwilFwCqtpVlQfCaDMay73CzsoNPd3 4Ov//zm0tzmT8j7m7RDeeercpc9Xiv0FYTNFfxfGiu/raFuINnS98P2DOcX/ZdUDnyVQ 81pzpFyDt/qN1FdLXivQgsF26o4d21nT4plP2v0xyPc5B7sl2ckCbAnK/lLz92K/vvjn w3sPTFy4LLtS4aKYJDZlJufON+0iIXyNaQ5yaIA8PKbMkAXi8zZvVwJ25MJrwAmHZpny f4Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895559; x=1710500359; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Q17gl107RYT0eMy0dwx+fE6K3UqQeF/uj+kx0/lTA7k=; b=FlCwQjnFGOOJKPmyyCccqyKIoiZbjHLdg85sWw0KxzeEAOwD8zMZB60iDC5GkV28Ng 8mWLPWrhUO+uJViBuNWVm58nMf+YzvmJDODPsLOYHD3ZP2UrYczND5i1/AhINXf3YTl6 1QiHSUafa4pJOSQPp8IUt6CvFofAGAY6ybqHpWdwX7NEw15AyE9wLBmI7KpGhqCoQ8XW k/l082Jwx6GWy4SfjU8yxnKAFk99SWl8omQj0sI5UAWWV4agMgq7kLkaxMY47XZqr4q/ Sw1MUZ96VT1wAO1D3nVxs8px5DsIQOzTtbNbsCgCf9MabmXzEoi6bWCoWFMXHvg2io8Z AJnw== X-Gm-Message-State: AOJu0Yyf3paugQnz/fJDcDW8gxsqqZfsdclCh7xh+0ffy0+fNiogQTpF Drg5wunFLYeqNqtEuV3l9RYXcY4ZMvE+5Dx7+nT6K5USI1IxKXZt/7MUPnftgtI= X-Google-Smtp-Source: AGHT+IFMkLwvoJf4W5rE+HD9jDMPpS1fkiNsKKIjxiXvpMtTxvAb/UxPqR3VPIIQm2NVA6nULhvW2g== X-Received: by 2002:a05:600c:35d6:b0:412:e70a:7015 with SMTP id r22-20020a05600c35d600b00412e70a7015mr9434039wmq.25.1709895559469; Fri, 08 Mar 2024 02:59:19 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:19 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 05/10] sched/debug: Allow CONFIG_SCHEDSTATS even on !KERNEL_DEBUG kernels Date: Fri, 8 Mar 2024 11:58:56 +0100 Message-Id: <20240308105901.1096078-6-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" All major Linux distributions enable CONFIG_SCHEDSTATS, so make it more widely available. Signed-off-by: Ingo Molnar Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde Cc: Valentin Schneider Cc: Vincent Guittot --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ef36b829ae1f..0d6700f23ca4 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1250,7 +1250,7 @@ config SCHED_INFO =20 config SCHEDSTATS bool "Collect scheduler statistics" - depends on DEBUG_KERNEL && PROC_FS + depends on PROC_FS select SCHED_INFO help If you say Y here, additional code will be inserted into the --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46A5C56773 for ; Fri, 8 Mar 2024 10:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895564; cv=none; b=GlCE6P6nvL36ADBVI5uP4LtRS8GjAoTo4qlP7Bh5+PJSL9joo3B8HOQ/gyHcTVsMxTxvMMPG5fFd2K8nBbjagsZXE8vd1uz901MY/y+TPmmcl53YXSE23Jsq+Z3a8MT5vrM0rCfYJCgqY9+fHIwLIBAAtSfawPHP3YCoEqxDD54= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895564; c=relaxed/simple; bh=M6CW5mBJg38Y9c2Xjs+dT2XhOrcXFYv3cx4DXUuJqvI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eDVJCR0Pk91zh3UyhKM2VYWhz8NnXMXba+Uy5nBBWikS3lNKVohE4r/6GLy87lEfchpl3ZrKZjQxp4vN4RTzVIWQ2v44trFgEKxGiHf2A67cf1/p8I8vLaKmPrzkNtx8e2F+80EVLUtyGcyMUb1Q0PM3y3rTwK8rCOfcrQu/YjM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Khw4wH6o; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Khw4wH6o" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-413131d40f4so4995205e9.3 for ; Fri, 08 Mar 2024 02:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895560; x=1710500360; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=ZnwAghIMKls3/k0E6rrASoLxxZUTrO+4ycesi8BiBsQ=; b=Khw4wH6oO9dALGcFM1nNcyplRDxMZypKIG3uIg2GNzA6Q3sJK+rY+9mBS1NUleSTWY uOcHAOVgZ+F3RZb1fWe3KcjA8Lj6M6tKIzAylvlu2n5lhJEvZxqCm7PSrbuKzCxW0fW2 q4suy7xizJxAJqmqjPLq4NnuqDPMdtGVD+SPzVl0XCZBT/GB8BJKYI8ZVTQdbj22y5z/ lqPffvVIcB5N74y/mAezQg1VjnKfGviw+qaJZMijHJP6s3XJbJcl0iFFk3xTgBDNccCw K3eFwgW7Co16stzpyw7Mwh4b/qm8vbPL5J/KAKuyjYxURQh08FjWhBpNKI0GUPdHAUCW ifwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895560; x=1710500360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZnwAghIMKls3/k0E6rrASoLxxZUTrO+4ycesi8BiBsQ=; b=NeqemWIiVic9xJbRn1iOMVUms3xhiJyyDYnSELkqpOHzvnMYlWoSHWUVgFsGafglOC VyEQDD3rg+PTtujeeCyDOZ6j1WbT3mvOIdxMwb71oS7/yXm/aSFcbKe6cTFBk2IfK/se 5PBpMwpJQgKRu4nJx5srMcjejfqeiy2fSBJFE1wKgCV2NUkgstLc//bPU876aFad8YBp WGbJ/W5mho6cHE8n1vsMIPfAA2LSpbOZVQNg8FuLGt2udS3A95y3+6a1qMyqEEFc6Jjo N3jRihUNLxZ/7+OPhce9pHqU9H6TTwptZLT2S8KTy64S57HzRHmQPEMYYRrJ+x+aDI3U 0m1Q== X-Gm-Message-State: AOJu0Yx7uAU2L1B09+DG1uHKrxc2li9p4tlqHN9c0++OjMmPIB4Jqc2X f+peuzV6YzKGpbSGwNj95XcxGFEloYVJskirUgMszw16FT98qI0f/clJOJ78lSM= X-Google-Smtp-Source: AGHT+IHjQHk5yqTQuoPifepV8kMlcmbrx8rEtxqRPbAD2qnPa5kueJ3P6e/gAklenZepWS8KfzhoSw== X-Received: by 2002:a05:600c:1d9a:b0:412:eaf0:110c with SMTP id p26-20020a05600c1d9a00b00412eaf0110cmr8059893wms.21.1709895560433; Fri, 08 Mar 2024 02:59:20 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:20 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 06/10] sched/balancing: Change comment formatting to not overlap Git conflict marker lines Date: Fri, 8 Mar 2024 11:58:57 +0100 Message-Id: <20240308105901.1096078-7-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" So the scheduler has two such comment blocks, with '=3D' used as a double u= nderline: /* * VRUNTIME * =3D=3D=3D=3D=3D=3D=3D=3D * '=3D=3D=3D=3D=3D=3D=3D=3D' also happens to be a Git conflict marker, throwi= ng off a simple search in an editor for this pattern. Change them to '-------' type of underline instead - it looks just as good. Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Reviewed-by: Vincent Guittot Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde --- kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3a510cf1fb00..84d4791cf628 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3679,7 +3679,7 @@ static void reweight_eevdf(struct cfs_rq *cfs_rq, str= uct sched_entity *se, =20 /* * VRUNTIME - * =3D=3D=3D=3D=3D=3D=3D=3D + * -------- * * COROLLARY #1: The virtual runtime of the entity needs to be * adjusted if re-weight at !0-lag point. @@ -3762,7 +3762,7 @@ static void reweight_eevdf(struct cfs_rq *cfs_rq, str= uct sched_entity *se, =20 /* * DEADLINE - * =3D=3D=3D=3D=3D=3D=3D=3D + * -------- * * When the weight changes, the virtual time slope changes and * we should adjust the relative virtual deadline accordingly. --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B9405787D for ; Fri, 8 Mar 2024 10:59:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895565; cv=none; b=P+9MMIGtsJ/maLTFU3xoxlFRWwiOJ54iDrBDrPFylmX1+zCoimO3234bTxWrYL2svv9aSGcMkwpLY6oW/EtQvmYcX0e0kie2vvlcGlpVHKlseo+ibL/MESZnuabE5XDxU/nPU+RnagfvddCHG+vnWrSpK0h12vqxOS8iC5EbwkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895565; c=relaxed/simple; bh=jvd/ckWSFQuQAPs4OsDhzwHrIEHK4Z0I1Gi8xjnR7v4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qXSUMiUyvJjmlRomB0+CGIZS40CUgU82BpEKUFSpmXD91jI2UzWKydU/6J1He9bkkFpON+10KEzOGs3M46MG/7IfkqLCxTKPMvMN81z4dJa6EKfnTCjWQH0uiYEwoq3nIKARb6kA0wezvegoiZ5h2/eAg/2osb8bvz9SlWGZdzk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UDECUJm+; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UDECUJm+" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-51323dfce59so772944e87.3 for ; Fri, 08 Mar 2024 02:59:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895562; x=1710500362; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=7ybDTCqxmEUr08eKUXzT0FhVWhzTIcU216Z59OdLni4=; b=UDECUJm+WhVPaps47T2Qmd1zZWPed3hee4bAl/zbORWzE4Budnvw8hQVrO8AoYMpqd 5b7y95cB4AGRjbArcC+jvQIL3HJ6BXgN7AcPDlMwYEjgafQbk6NfViwBwXHSGOYpAQOQ gEgyrOU4k4Mmq9Mn3KaKKPMGoJPQMFmHUjiGIpMvrT3QZ6xg0GXpPoht9LWrQxWlcOS+ HBfsbbzxuCUg0vA2/pqGQsgRJ/W4oIcJtTnxTvIqKqvYyTgTy8glFbOuPmKGX6H9jAF1 u7SV5tWKYQ3QE0WLYQgFs60hMcPK1bIMW0LOBkBlO9j32VNtpLQ1MA6mDNAf34LUEXyW l1tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895562; x=1710500362; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7ybDTCqxmEUr08eKUXzT0FhVWhzTIcU216Z59OdLni4=; b=Dq6OY3ar9/+924TcamwTmpeVE/O6OOs8WJMc9A5c59fEEFrrskhuq+wSyR82hhTUqi AZS0+CNYcHMZiB5XUe+lKPDWmMOQA34q95N/qddKo221jehiWj7M7QQgwmVdU3N0G5Lp H9hmWP3D86DwyFzRPGJRoL6fTLnC7uD5Tbj/AJ0DKfaziE1zA/5fsyh4SDqBn4lhuhKf DkMV+VxILedvvhw4ND+TotwQ0Q2ERUzp5x+CuR7B0hVNZsFmvgD4UiVv4CsVWYnPTS+H sVPKmhU86eMbv7rWzf6EPSc9WmDLFIG7Rbz6kcXHRWE62Uxy8QLrnKEPhvk3E/YhZyZa 6Bhw== X-Gm-Message-State: AOJu0YxBcJL0XS+uvdHvCosNVdl7woVjC5Baql9UQyrcv3gNBJkZ6cBD G5FfPADGSTeIhaKtiimgJsdIlKowdoEd8+QRyPobcG4n9MbrSLtBtnAkUtHid04= X-Google-Smtp-Source: AGHT+IEOFx6N2ufye3+7jlFwX6zodqhgreM3OywFAbalMjW1nOjb080PzmkJ3kC2H50ZMf8BeLrxvQ== X-Received: by 2002:ac2:47f2:0:b0:513:814d:c05f with SMTP id b18-20020ac247f2000000b00513814dc05fmr2473757lfp.66.1709895561541; Fri, 08 Mar 2024 02:59:21 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:21 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 07/10] sched/balancing: Fix comments (trying to) refer to NOHZ_BALANCE_KICK Date: Fri, 8 Mar 2024 11:58:58 +0100 Message-Id: <20240308105901.1096078-8-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix two typos: - There's no such thing as 'nohz_balancing_kick', the flag is named 'BALANCE' and is capitalized: NOHZ_BALANCE_KICK. - Likewise there's no such thing as a 'pending nohz_balance_kick' either, the NOHZ_BALANCE_KICK flag is all upper-case. Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde Cc: Vincent Guittot Reviewed-by: Vincent Guittot --- kernel/sched/fair.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 84d4791cf628..f3c03c6db3c8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -12409,15 +12409,16 @@ static int newidle_balance(struct rq *this_rq, st= ruct rq_flags *rf) } =20 /* - * run_rebalance_domains is triggered when needed from the scheduler tick. - * Also triggered for nohz idle balancing (with nohz_balancing_kick set). + * This softirq may be triggered from the scheduler tick, or by + * any of the flags in NOHZ_KICK_MASK: NOHZ_BALANCE_KICK, + * NOHZ_STATS_KICK or NOHZ_NEXT_KICK. */ static __latent_entropy void run_rebalance_domains(struct softirq_action *= h) { struct rq *this_rq =3D this_rq(); enum cpu_idle_type idle =3D this_rq->idle_balance; /* - * If this CPU has a pending nohz_balance_kick, then do the + * If this CPU has a pending NOHZ_BALANCE_KICK, then do the * balancing on behalf of the other idle CPUs whose ticks are * stopped. Do nohz_idle_balance *before* rebalance_domains to * give the idle CPUs a chance to load balance. Else we may --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5123658239 for ; Fri, 8 Mar 2024 10:59:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895565; cv=none; b=gpDKoa/9k5y2b3o4rynY57grkVzqy0dgXn2F+G5TH9a6BuXCy/nsVQhKkBLWt1gyb8u8B8N3AVw1+UnUid9781XPdHsP5nbPWIVl4d9KQDUY5oXfVYxsCXf9vlbbHZ+LxM9WX5rIRuImf1JwbTbyFSZ1BXGRDEW0WVigX+HCp9w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895565; c=relaxed/simple; bh=A3rn/di0TQLpQiYh2AGCJI+ueeZiWtNVcO2Lb3sTkRQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VPR9yPPf+vd8ZnN3ty3IkgXxJ3dwz++nAOwU+TfD+n1FxBgeZghkS/WsWSfGDHUUJEBHaCEcxQUGyIqZHTQZXBlKpE5uGzwxHmwhwEfArjNJ6IWNBFhDRFjnZ71BOcnnqgUFOojDi/p16R/pgEmPyJQ2cuk5eG7fJy70rAEvQTA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QBySYHTE; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QBySYHTE" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41312adc3deso10654895e9.3 for ; Fri, 08 Mar 2024 02:59:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895563; x=1710500363; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=AmmiIoTIOSqOS6k+PYGbdPJRqghLzMN0dL6QEudSlAc=; b=QBySYHTEFWqpIrifQ6f7VgPEmzf8YGin+3nuw0TjPdx7crmuy/lafgKZDkoc6JG5JZ QvVi59ug9JwSzjB70ZOveaNCQTT59NhR++sy1lectznZyLum4rVXlkjXI0b+2e4pBS0B vhF/AWf6GG7G87hJb08HpjQyPLakw4YXbYHy4TVbwoKiuKFjFC9XDQDX0he8AKjoCxI9 X1EMjkk5b8lxGOfN6zjHNsSBq6+4A2wC52tulDn03qlEXgYYTZhnlacqCoYp8DKJhRWs iJRCHmnvnIF20wuzSIhl0NlRkSUVomfPCYO/qsQdDmJcm/Nn4w9AMwRZrPgXtgv4nZE3 MN2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895563; x=1710500363; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AmmiIoTIOSqOS6k+PYGbdPJRqghLzMN0dL6QEudSlAc=; b=nM1ITqX+zmbOqohO/WfOglW8rHqG/IJhPx2x80aFCfHPqaJIToksP1C3Qj+RsSEP45 83OJsCZbQb0r6esjS7V9lMW0iEGY7CMggkUNVEMAadh1FsNyEfyi5GpjtFn3m/c2KZeE y4QWhNIvgU0CwZmTSYp1vjhUlFGZ12k9p/7d2vnP/xXLLLnxSHUAr5UktOtM8YPxZpSH iAKVoI//VeqXg8HZU0WPmV/TWovqyQJ5/yntLl6jAs9PeXNFhWGVHA1BNL34CUY4eP84 FMVKDPfzaJ4D6miFQQfKwpbriP0r4TOtc+AUknXJa3pbUICG9Gy+zUeW40ypYZFuQgYj 689w== X-Gm-Message-State: AOJu0Yz6+NDQvJzES/Dob6ERn7Jljy+sWUM19b2PhUaVhfRN0VnyrOnw 4gZvwvPZGvbfRlqOZHoBh2g5mREJMGfarmpzjso6sVsJEk+zIV7C7ZsaxMHeGPE= X-Google-Smtp-Source: AGHT+IFaj/wYXB+SZg6AFczDOjTIN8/CaZvDV4ePDIOFHebKSslJo+jPufqL+3Oi+Gpgu5us1jT0/Q== X-Received: by 2002:a05:600c:1549:b0:413:1047:362f with SMTP id f9-20020a05600c154900b004131047362fmr3234852wmg.30.1709895562580; Fri, 08 Mar 2024 02:59:22 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:22 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 08/10] sched/balancing: Update run_rebalance_domains() comments Date: Fri, 8 Mar 2024 11:58:59 +0100 Message-Id: <20240308105901.1096078-9-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The first sentence of the comment explaining run_rebalance_domains() is historic and not true anymore: * run_rebalance_domains is triggered when needed from the scheduler tic= k. ... contradicted/modified by the second sentence: * Also triggered for NOHZ idle balancing (with NOHZ_BALANCE_KICK set). Avoid that kind of confusion straight away and explain from what places sched_balance_softirq() is triggered. Signed-off-by: Ingo Molnar Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde Cc: Valentin Schneider Cc: Vincent Guittot Reviewed-by: Vincent Guittot --- kernel/sched/fair.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f3c03c6db3c8..b567c0790f44 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -12409,9 +12409,12 @@ static int newidle_balance(struct rq *this_rq, str= uct rq_flags *rf) } =20 /* - * This softirq may be triggered from the scheduler tick, or by - * any of the flags in NOHZ_KICK_MASK: NOHZ_BALANCE_KICK, - * NOHZ_STATS_KICK or NOHZ_NEXT_KICK. + * This softirq handler is triggered via SCHED_SOFTIRQ from two places: + * + * - directly from the local scheduler_tick() for periodic load balancing + * + * - indirectly from a remote scheduler_tick() for NOHZ idle balancing + * through the SMP cross-call nohz_csd_func() */ static __latent_entropy void run_rebalance_domains(struct softirq_action *= h) { --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FB7F5A4D3 for ; Fri, 8 Mar 2024 10:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895567; cv=none; b=YjneXp6wEipgEeEv4A7E5kZNoohUcMeTHIKewUS8PWGdx3yv/+HesLY+m5MW+EhjOUMF28I2zIQTYT51B9mUce68yu7bKJOfeOfyOVXyBF0jNz4C+Isq128Zboq1BSTWJ9LtNasKcFTctiyHRUq48KynbExNK2720S+kJStkLt4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895567; c=relaxed/simple; bh=ubt7kAoCJQjP71eh+xekBt691hX9l2wuKxynxUyQakA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=f7lzoQI8MCrK3vAJtAtD/ioV6mx7cVc66npLfUMLHiZMmZTGRG5jcviDiDYV6MimJHb1iWkF7Vtk2gVwJv9eRSNXen2WTF9xFA0a7YfCifMXTm8H+ahDFYhKfe+G5h6JdtHE593ODFHvtLRQ8hlCYcUU+E4Yh2ciZrwajuGMX7U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lOaUczvw; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lOaUczvw" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-412f1961101so16983595e9.0 for ; Fri, 08 Mar 2024 02:59:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895564; x=1710500364; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=bEBAYWJaT1vEVYD8Qqh08dtRz0Ow84weCEvJx52ecWM=; b=lOaUczvwDt69QrrJM+3UAlPw2S2dtSG5vsxWmr/hTtIVd2XRyJ6m1qnTaUd9xIqa6N Uc2OdpdlAXAWwsdldoKiTnnPyYCTj8GM4eNqZPu/PG9i7Uopkg7/LlcZHIJbcFqFwEtl 5+ZpPXW9PpTzgBmtaAmcM3fiGtZKoJRHL2dxDjoWI7hngTPCP0MD/L9IOVEl9bsU5tCB A4niiHb7qs5puENqR3YEG/q4lvewwwSbLlk+3j9T8WmPYfJiKqQyj46oWVwHVa2XLoe0 ptHWHB7qL5kwkIaQmRbtJtT7t6WLyH+0QmipEXDVBEMu4SqkdowlL1I53tfVCf0CNWll Ra8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895564; x=1710500364; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bEBAYWJaT1vEVYD8Qqh08dtRz0Ow84weCEvJx52ecWM=; b=a9IPg+BhRtSZopxjcJZIg76KbHeEfTWguFSlyQ9/Cli6Y5bntX5fRHD2iPT9QAcSiC fFWorOMuQmwz4xuBS+3w7AQcfUCa+7lCJOq0rJnmh+qCT4Cp1kzFm/kYAndyIdOhaCe6 4EtgjnAvRYdxrn0AOOwhQe04EOFxlWLOs2L4QPeAa/ohNpRdFqQlDAoVfqSmqNVoE7H7 XWcuvQB/pFdjfPfPjV1JVerLxQlzgC3CqFec/KxnI/9M7s1ONC+is+pcbHT1lXY4q0fI +lJSjOpN4mv9JpKnuDe1IdddGOf+ym4z1et2ie/HTx8Th7LUq2fvpLrpt/2pr5LImKqg VCGQ== X-Gm-Message-State: AOJu0YwNclhSotKgRMWi8NlxfJhMrxdzwsGpH6D43hSi0uWS807XW9Aq WoC9KTscoqI3kLuetkyH4Fv1HNuvcYOrHNULwy8mObU+WXdZnBZMUPiBva/BawU= X-Google-Smtp-Source: AGHT+IHt7IXMkTppYRHHONS7SRn+JmAFU+BK9TC8Q97hQScX5vgM45fmvhEycV19jVnovOGF3zzJ0g== X-Received: by 2002:a05:600c:3b89:b0:412:f196:1065 with SMTP id n9-20020a05600c3b8900b00412f1961065mr5918512wms.10.1709895563593; Fri, 08 Mar 2024 02:59:23 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:23 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 09/10] sched/balancing: Vertically align the comments of 'struct sg_lb_stats' and 'struct sd_lb_stats' Date: Fri, 8 Mar 2024 11:59:00 +0100 Message-Id: <20240308105901.1096078-10-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make them easier to read. Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde Cc: Vincent Guittot Reviewed-by: Vincent Guittot --- kernel/sched/fair.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b567c0790f44..40b98e43d794 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9436,19 +9436,19 @@ static void update_blocked_averages(int cpu) * sg_lb_stats - stats of a sched_group required for load_balancing */ struct sg_lb_stats { - unsigned long avg_load; /*Avg load across the CPUs of the group */ - unsigned long group_load; /* Total load over the CPUs of the group */ + unsigned long avg_load; /* Avg load across the CPUs of the group */ + unsigned long group_load; /* Total load over the CPUs of the group */ unsigned long group_capacity; - unsigned long group_util; /* Total utilization over the CPUs of the group= */ - unsigned long group_runnable; /* Total runnable time over the CPUs of the= group */ - unsigned int sum_nr_running; /* Nr of tasks running in the group */ - unsigned int sum_h_nr_running; /* Nr of CFS tasks running in the group */ + unsigned long group_util; /* Total utilization over the CPUs of the grou= p */ + unsigned long group_runnable; /* Total runnable time over the CPUs of th= e group */ + unsigned int sum_nr_running; /* Nr of tasks running in the group */ + unsigned int sum_h_nr_running; /* Nr of CFS tasks running in the group */ unsigned int idle_cpus; unsigned int group_weight; enum group_type group_type; - unsigned int group_asym_packing; /* Tasks should be moved to preferred CP= U */ - unsigned int group_smt_balance; /* Task on busy SMT be moved */ - unsigned long group_misfit_task_load; /* A CPU has a task too big for its= capacity */ + unsigned int group_asym_packing; /* Tasks should be moved to preferred CP= U */ + unsigned int group_smt_balance; /* Task on busy SMT be moved */ + unsigned long group_misfit_task_load; /* A CPU has a task too big for its= capacity */ #ifdef CONFIG_NUMA_BALANCING unsigned int nr_numa_running; unsigned int nr_preferred_running; @@ -9460,15 +9460,15 @@ struct sg_lb_stats { * during load balancing. */ struct sd_lb_stats { - struct sched_group *busiest; /* Busiest group in this sd */ - struct sched_group *local; /* Local group in this sd */ - unsigned long total_load; /* Total load of all groups in sd */ - unsigned long total_capacity; /* Total capacity of all groups in sd */ - unsigned long avg_load; /* Average load across all groups in sd */ - unsigned int prefer_sibling; /* tasks should go to sibling first */ + struct sched_group *busiest; /* Busiest group in this sd */ + struct sched_group *local; /* Local group in this sd */ + unsigned long total_load; /* Total load of all groups in sd */ + unsigned long total_capacity; /* Total capacity of all groups in sd */ + unsigned long avg_load; /* Average load across all groups in sd */ + unsigned int prefer_sibling; /* tasks should go to sibling first */ =20 - struct sg_lb_stats busiest_stat;/* Statistics of the busiest group */ - struct sg_lb_stats local_stat; /* Statistics of the local group */ + struct sg_lb_stats busiest_stat; /* Statistics of the busiest group */ + struct sg_lb_stats local_stat; /* Statistics of the local group */ }; =20 static inline void init_sd_lb_stats(struct sd_lb_stats *sds) --=20 2.40.1 From nobody Sun Feb 8 08:42:43 2026 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86F875B5C1 for ; Fri, 8 Mar 2024 10:59:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895568; cv=none; b=b08QHit3L4GXkjb4uuHnBZg87BgPk05mpVFFFYKBvxu93iOGpwTgDVzzpBhdmfEXibaUpAiluIh3dFIZDAPyOYEQwVL/ZtW2T3oiBG0dTljDPkgE56k6tei+6OeSLcg9rJSurdzUWtK3+N4KKhEy8yRi2rES4uXEGvFC0xqn++0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895568; c=relaxed/simple; bh=8cwQfRzQGnh4brkT8CjyLXxcv9IIDXvGcNIoK5bYZ5Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IWzfHcJGoibvqKZRS/tDvyL/v38nGX+1G3F4UttK38YqfoWUHyQBVOv8WqvLGeHVt95NtYyv/rFJSFoP8f07GbK5gxTcBurXsLi9mBnXRNTAGig6Vu24F3NBEUZdVpt0K/o1zI8lv/hYb+puRFkdwcWlBQ2U47ALKr0f7sKAVIA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iwop8B73; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iwop8B73" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4131804e695so2943775e9.0 for ; Fri, 08 Mar 2024 02:59:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895565; x=1710500365; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=oL0vnFENbcjnhhWim8StIpvyCHhEh0ryI7d1fyMUSfQ=; b=iwop8B735MigXQ4fcA/0FiEA1iBWYdEJEoWKRB/gRepfOrMPbcMOaRiYM2zJADHLxz ApjcQjr7qM+FpDRy4+B6HTBIf+qjhcjelcivcVRlRk9PMx4KinlW7rbjpzJ73M7xkMaB +NvVLDxEdniNakbun9SJG0juNb0YELtPtO7xCWYIeK11P8TZUfKcnVTqsU3hsQL+hSxa UBZqh1guhMxIvrA7SLH+PYghpCSVqZ+acFC7eUEQGdhb5Zu+IQ8ajQjeJBGkJ5EjPSOJ 2n41VOJva8Kn+WAe6m4nOAM5dOeHsD27/G9JR1OM6Mf67wXwACWD77YIu1qr2LSXAyy6 qwRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895565; x=1710500365; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=oL0vnFENbcjnhhWim8StIpvyCHhEh0ryI7d1fyMUSfQ=; b=h9vbSnwZZxI8/swyZimLqJPn4KVjooqZibN04oxhAk7v6fWPh+qbnvWt21sOJd5oB4 tXmhb44TG4tzYsUmJIZaPKVeobTyXe+6XC5Z1+LydBzP08xzjqiTFru7nWwkh/XTuua6 rhJm5IunHva3WIH4s6+vSrWhCcfuElQJhReojfIQ4VE+nAaq+nslXo+4PBpYv4e3amHk ffEiA+IaIy92MKzDfWZF6n3qho/mphs68Kyhes/tK8pKpJzWtjw27hjFSoQInCnZDyow 4vSEH6Z8MaT5qSrTpIURvaNrbmrkJXGAn0zZ5o9wA+OhoAmI8YZn/PideooEWURnlZyK X/Ig== X-Gm-Message-State: AOJu0YxsHdSx6jlFKMQGvjN/uzEWt8b8BdrGCh0tGCCp/gmtLRllXo09 K+8ERJSTFjCEvIPrk1NIQ7bEK87NM9YXGuCFC9TrJEmG4LZxSSgveCboM7HFLDU= X-Google-Smtp-Source: AGHT+IHKMzwKstVRsql0EYbiSJAEPbtqcFTBBtihUSdD+H41bRadVI/kPcqNbZ3kjXIfag2jxlMVMg== X-Received: by 2002:a05:600c:4589:b0:412:bca4:6a00 with SMTP id r9-20020a05600c458900b00412bca46a00mr3891981wmo.18.1709895564745; Fri, 08 Mar 2024 02:59:24 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:24 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 10/10] sched/balancing: Update comments in 'struct sg_lb_stats' and 'struct sd_lb_stats' Date: Fri, 8 Mar 2024 11:59:01 +0100 Message-Id: <20240308105901.1096078-11-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" - Align for readability - Capitalize consistently Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde Cc: Vincent Guittot Reviewed-by: Vincent Guittot --- kernel/sched/fair.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 40b98e43d794..116a640534b9 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9433,17 +9433,17 @@ static void update_blocked_averages(int cpu) /********** Helpers for find_busiest_group ************************/ =20 /* - * sg_lb_stats - stats of a sched_group required for load_balancing + * sg_lb_stats - stats of a sched_group required for load-balancing: */ struct sg_lb_stats { - unsigned long avg_load; /* Avg load across the CPUs of the group */ - unsigned long group_load; /* Total load over the CPUs of the group */ - unsigned long group_capacity; - unsigned long group_util; /* Total utilization over the CPUs of the grou= p */ + unsigned long avg_load; /* Avg load over the CPUs of the gro= up */ + unsigned long group_load; /* Total load over the CPUs of the gr= oup */ + unsigned long group_capacity; /* Capacity over the CPUs of th= e group */ + unsigned long group_util; /* Total utilization over the CPUs of the gr= oup */ unsigned long group_runnable; /* Total runnable time over the CPUs of th= e group */ - unsigned int sum_nr_running; /* Nr of tasks running in the group */ + unsigned int sum_nr_running; /* Nr of all tasks running in the group */ unsigned int sum_h_nr_running; /* Nr of CFS tasks running in the group */ - unsigned int idle_cpus; + unsigned int idle_cpus; /* Nr of idle CPUs in the= group */ unsigned int group_weight; enum group_type group_type; unsigned int group_asym_packing; /* Tasks should be moved to preferred CP= U */ @@ -9456,8 +9456,7 @@ struct sg_lb_stats { }; =20 /* - * sd_lb_stats - Structure to store the statistics of a sched_domain - * during load balancing. + * sd_lb_stats - stats of a sched_domain required for load-balancing: */ struct sd_lb_stats { struct sched_group *busiest; /* Busiest group in this sd */ @@ -9465,7 +9464,7 @@ struct sd_lb_stats { unsigned long total_load; /* Total load of all groups in sd */ unsigned long total_capacity; /* Total capacity of all groups in sd */ unsigned long avg_load; /* Average load across all groups in sd */ - unsigned int prefer_sibling; /* tasks should go to sibling first */ + unsigned int prefer_sibling; /* Tasks should go to sibling first */ =20 struct sg_lb_stats busiest_stat; /* Statistics of the busiest group */ struct sg_lb_stats local_stat; /* Statistics of the local group */ --=20 2.40.1