From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 584F4221FD0 for ; Tue, 2 Dec 2025 08:13:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764663193; cv=none; b=TvMpVrJCbO0iJkPOU0SELPaVoGayxLtHgXFvkIMVP5HaQAR1GVYc2wNOjS01zWOUccbq7dWFJ2Mqzo7gTXQ0cEWz2i9iVcwVbQ/A/VY1Y08hguy81qgkXdj/UrbsKY54XgTtCi6P1RJ+1CzdiUn51Ny36qJ78kQl3Qrmr3cMlSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764663193; c=relaxed/simple; bh=852yWY3nFtt1EAMdNO7NIt30lNzAmUHRYpM4qa+x5LA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EnbuTM2Sb8nBcqkSyzuuQWAiwBUPsrAEF7OL9+IG7QzVaPaQ5jrFNyXNLHnfVpktyeU8rWUGxnz3lxZnm73BG3wiynvBYCFZfxIKgjyVaBRza11iQaJzC9EZUORNOWj7FdcDiEexR/FBpDioIhjtDsz1Rc03S6qDawPpPtWHHnc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Tu/Dq6Er; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Tu/Dq6Er" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6D06C116D0; Tue, 2 Dec 2025 08:13:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764663191; bh=852yWY3nFtt1EAMdNO7NIt30lNzAmUHRYpM4qa+x5LA=; h=From:To:Cc:Subject:Date:From; b=Tu/Dq6ErsBSVCJ3mQARnb1uyCEyJXK6KJtcymIjKW9veHBE7qWLxG0ffziTTwSUU/ 7OCUPmVyjwF/f1S0+WhL3fhtf9NNxDCyJBNE6YErpRGZ2gpQGvQszw+inbg17Ktv/Y OF9fdUjr1zMUaaOOMi8AiHdPEgQM0da/LdpEHv9T8bmHHj5xMN/9CCN7Cgc248r5d+ hzuLQ27kPbhIp3kQ036kSLQWRvHXipc+RZhMvHxRfbrAty4mP5WG1AS5uMVQfn/3M2 JkDmyuGXzJC0K99B8DezDJmA3vsNKUi7bqVBwUuTAmA0uM1JuCQW2jQciOiNv5qHlo YkPLvyex34+KA== From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Frederic Weisbecker , Shrikanth Hegde , Juri Lelli , Dietmar Eggemann , Valentin Schneider , Vincent Guittot , Linus Torvalds , Mel Gorman , Steven Rostedt , Thomas Gleixner , Ingo Molnar Subject: [PATCH 0/3] sched/fair: Sort out 'blocked_load*' namespace confusion Date: Tue, 2 Dec 2025 09:13:01 +0100 Message-ID: <20251202081304.3103393-1-mingo@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit There's three separate, independent pieces of logic in the scheduler that are named 'has_blocked': 1) nohz.has_blocked, 2) rq->has_blocked_load - both of these relate to NOHZ balancing, 3) and cfs_rq_has_blocked(), which operates on SMP load-balancing averages. While reviewing this code I noticed a couple of inconsistencies: - nohz.has_blocked sometimes gets handled via a local variable that is named 'has_blocked_load' - but it's the runqueue that has the has_blocked_load field, not the nohz structure ... - The cfs_rq_has_blocked() function does SMP load-balancing and has no relation to NOHZ has_blocked logic. - The update_blocked_load_status() function, which sets the rq->has_blocked_load field, has a parameter named 'has_blocked', but that's the field name of the nohz structure. To sort all of this out, standardize on 3 distinct patterns: (1) nohz.has_blocked related functions and variables use the 'has_blocked' nomenclature, (2) rq->has_blocked_load related functions and variables use 'has_blocked_load', (3) and cfs_rq_has_blocked() uses 'has_blocked_load_avg'. This series implements (1), (2) and (3) via three patches. The end result becomes a lot more greppable, as the following 'git grep' commands: git grep 'has_blocked\>' kernel/sched/ git grep 'has_blocked_load\>' kernel/sched/ git grep 'has_blocked_load_avg\>' kernel/sched/ ... will now output only the respective relevant lines. No change in functionality. Thanks, Ingo ================ Ingo Molnar (3): sched/fair: Rename the 'has_blocked_load' local variable to 'has_blocked' in _nohz_idle_balance() sched/fair: Rename the 'has_blocked' parameter in update_blocked_load_status() to 'has_blocked_load' sched/fair: Rename cfs_rq_has_blocked() => cfs_rq_has_blocked_load_avg() kernel/sched/fair.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)