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 1A424306B31 for ; Tue, 2 Dec 2025 08:13:15 +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=1764663196; cv=none; b=Xnmer2GCqzJaoFmPSJAM4l10S4RATIoUs0sL7jKhldUyry1CE4abFHVhMZzY09h4FekxNIwFPazDZkw6EEWkQv4nFVmmOT0LKtz3Kr2fDMcF7SAUBS3pVQXVuU11GLQkF0IMe+Nx/g/zAG/wrZvT4vctYgLJvuFl9ov7OvFmrVA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764663196; c=relaxed/simple; bh=SYMhnsaAXdoi5f6/xrh6Dusvupe7uVDXgT9cSz8hSHg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V1wAVVdTrFDqNbKaWOMduzwkF8iE+vESvJBpaP5StLRjlYCDQd+n3maZbdQdxttTorX83ZCvsD5sxwRhktiAaeoDdxjjk/El7WxQJcN38okqd5ycH/OHuuY8RVj3LP02vskOrjNjT690nOQtmkBjcuMgNDKQ/7aideieeCVyyzE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nhBDxAM/; 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="nhBDxAM/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A2E3C16AAE; Tue, 2 Dec 2025 08:13:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764663195; bh=SYMhnsaAXdoi5f6/xrh6Dusvupe7uVDXgT9cSz8hSHg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nhBDxAM/SWzoRSyvC5z4hpNzdJAWRr7g3gpv6NEhnZTn4/HRcFaHNiIRVO80AWGAB P1uotlMHr6HuR0vIqaTqkF16ghwJJDE+9aQ9ulxKFBUPeon2Bcm2Y6oVPZi5lJsSBz ulb+EkR1EtRMa517aaizVYlWyZfKfOHgAnVT8ctS/3jmRqu69ade0SIEy7NolhZIsX pXPclcBHCyqscWD8u9rEuNEvYJjVA6dQeWrQaweqHLTxTRgr8pZTX8ieFSSyTIH8Rx 5utPsPiJoLpy7PwTnnBz0FEFgKSv3IjrDtR6rFg72zJ0a7t5zEq6GCKfk4BZmGbodF m2J1TgF1U4DDw== 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 , Frederic Weisbecker Subject: [PATCH 1/3] sched/fair: Rename the 'has_blocked_load' local variable to 'has_blocked' in _nohz_idle_balance() Date: Tue, 2 Dec 2025 09:13:02 +0100 Message-ID: <20251202081304.3103393-2-mingo@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251202081304.3103393-1-mingo@kernel.org> References: <20251202081304.3103393-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: 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. To reduce confusion, split these 3 shared uses of 'has_blocked' name patterns into 3 distinct and greppable patterns: (1) nohz.has_blocked related functions and variables use 'has_blocked', (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 patch implements (1) and in _nohz_idle_balance() renames the 'has_blocked_load' local variable to 'has_blocked'. No change in functionality. Cc: Shrikanth Hegde Cc: Peter Zijlstra Cc: Frederic Weisbecker Signed-off-by: Ingo Molnar --- 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 ff647e92a314..3f21b77b59ce 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -12666,7 +12666,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags) /* Earliest time when we have to do rebalance again */ unsigned long now = jiffies; unsigned long next_balance = now + 60*HZ; - bool has_blocked_load = false; + bool has_blocked = false; int update_next_balance = 0; int this_cpu = this_rq->cpu; int balance_cpu; @@ -12710,7 +12710,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags) */ if (!idle_cpu(this_cpu) && need_resched()) { if (flags & NOHZ_STATS_KICK) - has_blocked_load = true; + has_blocked = true; if (flags & NOHZ_NEXT_KICK) WRITE_ONCE(nohz.needs_update, 1); goto abort; @@ -12719,7 +12719,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags) rq = cpu_rq(balance_cpu); if (flags & NOHZ_STATS_KICK) - has_blocked_load |= update_nohz_stats(rq); + has_blocked |= update_nohz_stats(rq); /* * If time for next balance is due, @@ -12756,7 +12756,7 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags) abort: /* There is still blocked load, enable periodic update */ - if (has_blocked_load) + if (has_blocked) WRITE_ONCE(nohz.has_blocked, 1); } -- 2.51.0