From: Frederic Weisbecker <frederic@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
anna-maria@linutronix.de
Subject: [PATCH 4/4] timers/migration: Simplify top level detection on group setup
Date: Wed, 15 Jan 2025 00:15:07 +0100 [thread overview]
Message-ID: <20250114231507.21672-5-frederic@kernel.org> (raw)
In-Reply-To: <20250114231507.21672-1-frederic@kernel.org>
Having a single group on a given level is enough to know this is the
top level, because a root has to have at least two children, unless that
root is the only group and the children are actual CPUs.
Simplify the test in tmigr_setup_groups() accordingly.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
kernel/time/timer_migration.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/time/timer_migration.c b/kernel/time/timer_migration.c
index 066c9ddca4ec..9cb9b6584ea1 100644
--- a/kernel/time/timer_migration.c
+++ b/kernel/time/timer_migration.c
@@ -1670,9 +1670,7 @@ static int tmigr_setup_groups(unsigned int cpu, unsigned int node)
* be different from tmigr_hierarchy_levels, contains only a
* single group.
*/
- if (group->parent || i == tmigr_hierarchy_levels ||
- (list_empty(&tmigr_level_list[i]) &&
- list_is_singular(&tmigr_level_list[i - 1])))
+ if (group->parent || list_is_singular(&tmigr_level_list[i - 1]))
break;
} while (i < tmigr_hierarchy_levels);
--
2.46.0
next prev parent reply other threads:[~2025-01-14 23:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 23:15 [PATCH 0/4] timers/migrations fixes and updates Frederic Weisbecker
2025-01-14 23:15 ` [PATCH 1/4] timers/migration: Fix another race between hotplug and idle entry/exit Frederic Weisbecker
2025-01-16 11:13 ` [tip: timers/urgent] " tip-bot2 for Frederic Weisbecker
2025-01-16 11:59 ` tip-bot2 for Frederic Weisbecker
2025-01-14 23:15 ` [PATCH 2/4] timers/migration: Enforce group initialization visibility to tree walkers Frederic Weisbecker
2025-01-16 11:13 ` [tip: timers/urgent] " tip-bot2 for Frederic Weisbecker
2025-01-16 11:59 ` tip-bot2 for Frederic Weisbecker
2025-01-14 23:15 ` [PATCH 3/4] timers/migration: Annotate accesses to ignore flag Frederic Weisbecker
2025-01-16 11:13 ` [tip: timers/urgent] " tip-bot2 for Frederic Weisbecker
2025-01-16 11:59 ` tip-bot2 for Frederic Weisbecker
2025-01-14 23:15 ` Frederic Weisbecker [this message]
2025-01-16 13:12 ` [tip: timers/core] timers/migration: Simplify top level detection on group setup tip-bot2 for Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250114231507.21672-5-frederic@kernel.org \
--to=frederic@kernel.org \
--cc=anna-maria@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox