From: Frederic Weisbecker <frederic@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Gabriele Monaco <gmonaco@redhat.com>,
linux-kernel@vger.kernel.org,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Waiman Long <longman@redhat.com>,
"John B. Wyatt IV" <jwyatt@redhat.com>,
"John B. Wyatt IV" <sageofredondo@gmail.com>
Subject: Re: [PATCH v15 7/7] timers: Exclude isolated cpus from timer migration
Date: Wed, 19 Nov 2025 23:31:07 +0100 [thread overview]
Message-ID: <aR5FK-RkGlUv0qY3@pavilion.home> (raw)
In-Reply-To: <87cy5dlll9.ffs@tglx>
Le Wed, Nov 19, 2025 at 11:10:58PM +0100, Thomas Gleixner a écrit :
> On Wed, Nov 19 2025 at 23:02, Frederic Weisbecker wrote:
> > Le Wed, Nov 19, 2025 at 10:23:11PM +0100, Thomas Gleixner a écrit :
> >> If you want to be a bit smarter, then you can just use a global mutex,
> >> which is taken inside the set/clear_available() functions which
> >> serializes the related functionality and bulk schedule/flush the unisol
> >> (make available) first and then proceed to the isol (make unavailable).
> >>
> >> Then nothing has to change vs. the set/clear operations and everything
> >> just works.
> >>
> >> That mutex does not do any harm in the CPU hotplug case and the
> >> serialization vs. the workers is not going to be the end of the world.
> >>
> >> I'm willing to bet that no real-world use-case will ever notice the
> >> existance of this mutex. The microbenchmark which shows off the "I'm so
> >> smart" metric is completely irrelevant especially when the result is
> >> fragile, incomprehensible and therefore unmaintainable.
> >>
> >> Keep it correct and simple is still the most important engineering
> >> principle. Premature optimization is a guaranteed path to failure.
> >>
> >> If there is a compelling use case which justifies the resulting
> >> complexity, then it can be built on top. I'm not holding my breath. See
> >> above...
> >
> > Perhaps the only thing that worries me is if an isolated partition
> > is inverted. Say 0-3 is non isolated and 4-7 is isolated. And then
> > cpuset is overwritten so that the reverse is applied: 0-3 is isolated
> > and 4-7 is not isolated. If all isol works reach before unisol works,
> > then tmigr_clear_cpu_available() -> cpumask_any(tmigr_available_mask)
> > won't find any CPU left on the last call.
>
> schedule the newly available (now unisolated) ones first and flush that
> work. After that you can safely mark the others unavailable, no?
Yes!
--
Frederic Weisbecker
SUSE Labs
next prev parent reply other threads:[~2025-11-19 22:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 8:33 [PATCH v15 0/7] timers: Exclude isolated cpus from timer migration Gabriele Monaco
2025-11-13 8:33 ` [PATCH v15 1/7] timers: Rename tmigr 'online' bit to 'available' Gabriele Monaco
2025-11-19 15:49 ` Thomas Gleixner
2025-11-13 8:33 ` [PATCH v15 2/7] timers: Add the available mask in timer migration Gabriele Monaco
2025-11-19 15:56 ` Thomas Gleixner
2025-11-13 8:33 ` [PATCH v15 3/7] timers: Use scoped_guard when setting/clearing the tmigr available flag Gabriele Monaco
2025-11-19 15:57 ` Thomas Gleixner
2025-11-13 8:33 ` [PATCH v15 4/7] cgroup/cpuset: Rename update_unbound_workqueue_cpumask() to update_isolation_cpumasks() Gabriele Monaco
2025-11-13 8:33 ` [PATCH v15 5/7] sched/isolation: Force housekeeping if isolcpus and nohz_full don't leave any Gabriele Monaco
2025-11-13 8:33 ` [PATCH v15 6/7] cpumask: Add initialiser to use cleanup helpers Gabriele Monaco
2025-11-13 8:33 ` [PATCH v15 7/7] timers: Exclude isolated cpus from timer migration Gabriele Monaco
2025-11-19 16:50 ` Thomas Gleixner
2025-11-19 17:14 ` Frederic Weisbecker
2025-11-19 18:15 ` Thomas Gleixner
2025-11-19 20:13 ` Frederic Weisbecker
2025-11-19 21:23 ` Thomas Gleixner
2025-11-19 22:02 ` Frederic Weisbecker
2025-11-19 22:10 ` Thomas Gleixner
2025-11-19 22:31 ` Frederic Weisbecker [this message]
2025-11-19 20:43 ` Waiman Long
2025-11-20 10:48 ` Gabriele Monaco
2025-11-20 21:04 ` Waiman Long
2025-11-13 13:12 ` [PATCH v15 0/7] " Frederic Weisbecker
2025-11-18 10:01 ` Gabriele Monaco
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=aR5FK-RkGlUv0qY3@pavilion.home \
--to=frederic@kernel.org \
--cc=anna-maria@linutronix.de \
--cc=gmonaco@redhat.com \
--cc=jwyatt@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=sageofredondo@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.