lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab9348b0e67f36dea92922bf76aadb7fe9d1667a.camel@redhat.com>
Date: Tue, 02 Sep 2025 13:08:25 +0200
From: Gabriele Monaco <gmonaco@...hat.com>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: linux-kernel@...r.kernel.org, Anna-Maria Behnsen
 <anna-maria@...utronix.de>,  Thomas Gleixner <tglx@...utronix.de>, Waiman
 Long <longman@...hat.com>
Subject: Re: [PATCH v11 8/8] timers: Exclude isolated cpus from timer
 migration

On Mon, 2025-09-01 at 23:11 +0200, Frederic Weisbecker wrote:
> Le Mon, Sep 01, 2025 at 03:48:15PM +0200, Gabriele Monaco a écrit :
> > On Mon, 2025-09-01 at 14:41 +0200, Frederic Weisbecker wrote:
> > > Why not evaluate tick_nohz_cpu_hotpluggable() from
> > > tmigr_clear_cpu_available() instead of this force IPI?
> > 
> > The idea is that this IPI runs once during late boot only for the
> > tick CPU, while the call to tick_nohz_cpu_hotpluggable() would be
> > running at every hotplug event if I move it to
> > tmigr_clear_cpu_available. In that scenario, it's guaranteed to
> > return true (besides the very first call).
> > 
> > I don't have a strong opinion against running that check every time
> > although it's needed only at boot time and remove this IPI, but in
> > my understanding that's one of the thing Thomas was finding
> > confusing [1].
> > 
> > Am I missing anything here?
> 
> Right, Thomas didn't like it, but the organization of the code has
> changed a bit since then with the late initcall. If the best we can
> do to workaround the situation is to make the CPU unavailable
> regardless and then undo that right after with an IPI, then it's a
> good sign that we should just simplify and eventually check
> tick_nohz_cpu_hotpluggable() from tmigr_is_isolated().

Makes sense.
I'd be tempted using a static branch but since the call to
tick_nohz_cpu_hotpluggable() isn't really heavy, we can just be fine
including it in the tmigr_is_isolated() check.


> > > But if I understand correctly, this will be handled by cpuset,
> > > right?
> > 
> > Currently tick_nohz_cpu_hotpluggable() is called by
> > tmigr_should_isolate_cpu() and that is called by cpuset code,
> > changing cpuset would save that call but won't deal with the tick
> > CPU not enabled at boot time, unless I'm misunderstanding what
> > Waiman implied.
> 
> Good point!

Here I'm a bit unsure how to proceed though. We want to fail any single
isolated cpuset that includes the tick CPU under nohz_full. I can do it
directly in isolcpus_nohz_conflict and that looks easy.

But is that going to be clear for the user?
Can the user even know what the tick CPU is? Besides /assuming/ 0.

Thanks,
Gabriele

> Thanks.
> 
> > 
> > Thanks,
> > Gabriele
> > 
> > [1] - https://lore.kernel.org/lkml/875xgqqrel.ffs@tglx
> > 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ