mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Frederic Weisbecker <frederic@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Waiman Long <longman@redhat.com>
Subject: Re: [PATCH] timers: Exclude isolated cpus from timer migation
Date: Thu, 10 Apr 2025 15:56:02 +0200	[thread overview]
Message-ID: <4fdc6582c828fbcd8c6ad202ed7ab560134d1fc3.camel@redhat.com> (raw)
In-Reply-To: <Z_fHLM4nWP5XVGBU@localhost.localdomain>



On Thu, 2025-04-10 at 15:27 +0200, Frederic Weisbecker wrote:
> Le Thu, Apr 10, 2025 at 03:15:49PM +0200, Thomas Gleixner a écrit :
> > On Thu, Apr 10 2025 at 15:03, Frederic Weisbecker wrote:
> > > Le Thu, Apr 10, 2025 at 12:38:25PM +0200, Gabriele Monaco a écrit
> > > :
> > > Speaking of, those are two different issues here:
> > > 
> > > * nohz_full CPUs are handled just like idle CPUs. Once the tick
> > > is stopped,
> > >   the global timers are handled by other CPUs (housekeeping).
> > > There is always
> > >   one housekeeping CPU that never goes idle.
> > >   One subtle thing though: if the nohz_full CPU fires a tick,
> > > because there
> > >   is a local timer to be handled for example, it will also
> > > possibly handle
> > >   some global timers along the way. If it happens to be a
> > > problem, it should
> > >   be easy to resolve.
> > > 
> > > * Domain isolated CPUs are treated just like other CPUs. But
> > > there is not
> > >   always a housekeeping CPU around. And no guarantee that there
> > > is always
> > >   a non-idle CPU to take care of global timers.
> > 
> > That's an insianity.
> 
> It works, but it doesn't make much sense arguably.

I wonder if we should really worry about this scenario though.

> 
> > 
> > > > Thinking about it now, since global timers /can/ start on
> > > > isolated
> > > > cores, that makes them quite different from offline ones and
> > > > probably
> > > > considering them the same is just not the right thing to do..
> > > > 
> > > > I'm going to have a deeper thought about this whole approach,
> > > > perhaps
> > > > something simpler just preventing migration in that one
> > > > direction would
> > > > suffice.
> > > 
> > > I think we can use your solution, which involves isolating the
> > > CPU from tmigr
> > > hierarchy. And also always queue global timers to non-isolated
> > > targets.
> > 
> > Why do we have to inflict extra complexity into the timer enqueue
> > path
> > instead of preventing the migration to, but not the migration from
> > isolated CPUs?
> 
> But how do we handle global timers that have been initialized and
> queued from
> isolated CPUs?

I need to sketch a bit more the solution but the rough idea is:
1. isolated CPUs don't pull remote timers
2. isolated CPUs ignore their global timers and let others pull them
  perhaps with some more logic to avoid it expiring


Wouldn't that be sufficient?

Also, I would definitely do 1. for any kind of isolation, but I'm not
sure about 2.
Strictly speaking domain isolated cores don't claim to be free of
kernel noise, even if they initiate it (but nohz_full ones do).
What would be the expectation there?

Thanks,
Gabriele


  reply	other threads:[~2025-04-10 13:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10  6:54 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 [this message]
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
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=4fdc6582c828fbcd8c6ad202ed7ab560134d1fc3.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=frederic@kernel.org \
    --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

all inboxes | Powered by JetHome®