public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, Waiman Long <longman@redhat.com>
Subject: Re: [PATCH] timers: Exclude isolated cpus from timer migation
Date: Sat, 12 Apr 2025 00:57:02 +0200	[thread overview]
Message-ID: <Z_mePtIrl6z5fJBc@pavilion.home> (raw)
In-Reply-To: <1047ba4c25cdf4c0098dac308bcddb4b8b671954.camel@redhat.com>

Le Fri, Apr 11, 2025 at 03:02:11PM +0200, Gabriele Monaco a écrit :
> 
> 
> On Fri, 2025-04-11 at 13:31 +0200, Frederic Weisbecker wrote:
> > Le Fri, Apr 11, 2025 at 09:08:35AM +0200, Gabriele Monaco a écrit :
> > > Mmh, my patch is in fact allowing isolated cores to still migrate
> > > everything if they go offline.
> > 
> > Sure that doesn't change.
> > 
> > > 
> > > However I don't think housekeeping CPUs can execute remote timers
> > > on
> > > isolated ones.
> > 
> > I'm confused, a CPU can't execute something on another CPU (except
> > with
> > an IPI). But:
> > 
> > Before your patch, a housekeeping or isolated CPU can pull timers
> > from
> > any other CPU and execute them on its behalf.
> > 
> > After your patch, a housekeeping CPU can only pull timers from other
> > housekeeping CPUs. And isolated CPUs each execute their own global
> > timers.
> > 
> 
> Right, the way I said it doesn't really make sense.
> 
> What I mean is: why wouldn't a housekeeping CPU pull global timers from
> an isolated one?
> 
> We want to prevent the other way around, but I think housekeeping
> should be encouraged to pull timers from isolated CPUs, even if those
> are not idle.
> 
> I see only preventing isolated CPUs from pulling remote timers may play
> bad with the algorithm since they'd register in the hierarchy but just
> not pull timers.
> (This simpler approach works in our scenario though)
> 
> The idea in my patch could mostly work, but I'd explicitly let
> housekeeping CPUs pull timers from isolated (while of course not doing
> it for offline ones).
> 
> Does it make sense to you?

If you want housekeeping CPUs to pull timers from isolated ones, then you
need isolated CPUs to eventually be part of the hierarchy (be "available"),
because they would need to propagate their global timers up to the top.

If they propagate their global timers then they must play the whole hierarchy
game and be ready to pull the timers from any other CPUs.

Because if they propagate their timers, they must also propagate their
idle state to synchronize with the whole hierarchy and know if there is
a non-idle housekeeping CPU to take care of their timers. And if they propagate
their (non) idle state, the isolated CPUs also declare themselves as available
to handle other's timers.

And working around that would be very nasty.

-- 
Frederic Weisbecker
SUSE Labs

  reply	other threads:[~2025-04-11 22:57 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10  6:54 [PATCH] timers: Exclude isolated cpus from timer migation Gabriele Monaco
2025-04-10  8:26 ` Thomas Gleixner
2025-04-10 10:38   ` Gabriele Monaco
2025-04-10 13:03     ` Frederic Weisbecker
2025-04-10 13:15       ` Thomas Gleixner
2025-04-10 13:27         ` Frederic Weisbecker
2025-04-10 13:56           ` Gabriele Monaco
2025-04-10 14:20             ` Frederic Weisbecker
2025-04-10 14:46               ` Thomas Gleixner
2025-04-10 14:54                 ` Frederic Weisbecker
2025-04-10 15:06                   ` Waiman Long
2025-04-10 14:46               ` Gabriele Monaco
2025-04-10 14:59                 ` Frederic Weisbecker
2025-04-10 15:05                   ` Gabriele Monaco
2025-04-10 15:32                     ` Frederic Weisbecker
2025-04-11  7:08                       ` Gabriele Monaco
2025-04-11 11:31                         ` Frederic Weisbecker
2025-04-11 13:02                           ` Gabriele Monaco
2025-04-11 22:57                             ` Frederic Weisbecker [this message]
2025-04-14  8:06                               ` Gabriele Monaco
2025-04-10 14:35       ` Waiman Long
2025-04-10 14:43         ` Frederic Weisbecker
2025-04-10 14:49           ` Gabriele Monaco
2025-04-10 14:50           ` Waiman Long
2025-04-10 14:56             ` Frederic Weisbecker
2025-04-10 13:08     ` Thomas Gleixner
2025-04-10 14:21     ` Waiman Long
2025-04-10 14:32 ` Waiman Long
2025-04-11  7:12 ` kernel test robot
2025-04-11  9:27 ` kernel test robot

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=Z_mePtIrl6z5fJBc@pavilion.home \
    --to=frederic@kernel.org \
    --cc=gmonaco@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox