public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Yun Levi <ppbuk5246@gmail.com>
Cc: Frederic Weisbecker <frederic@kernel.org>,
	Joel Fernandes <joel@joelfernandes.org>,
	Vineeth Pillai <vineeth@bitbyteword.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	anna-maria@linutronix.de, mingo@kernel.org, tglx@linutronix.de,
	Markus.Elfring@web.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] time/tick-sched: idle load balancing when nohz_full cpu becomes idle.
Date: Thu, 16 May 2024 16:00:03 +0200	[thread overview]
Message-ID: <20240516140003.GJ22557@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CAM7-yPTSq0CSmRsTpeXwzhFk77gfwUK_LZKnbgo4NPk5zPCaAg@mail.gmail.com>

On Thu, May 16, 2024 at 01:43:49PM +0100, Yun Levi wrote:
> > > > > As such, I don't think the HK_TYPE_SCHED check in
> > > > > nohz_balance_enter_idle() actually makes sense, the on_null_omain()
> > > > > check a little below that should already take care of things, no?
> > > >
> > > > IIUC,
> > > > currently, whether cpu belongs on domain or null is determined by
> > > > HK_DOMAIN_FLAGS
> > >
> > > No! you can create NULL domains without any of the HK nonsense. Both
> > > isolcpus and cpusets can create single CPU partitions.
> 
> Yes. However what I said, nohz_full cpu isn't on null_domain
> unless it was configured by cpusets.
> even with option "nohz_full="

So if a CPU isn't isolated, either by isolcpus or cpusets, you get to
participate in load-balancing -- end of story.

> > > > However, when "nohz_full=" is used, it still on HK_DOMAIN, so it
> > > > belongs to sched_domain
> > > > so, it couldn't be filtered out by on_null_domain().
> > > >
> > > > unless "isolcpus=domain" or "isolcpus={cpu_list}", it's on null domain.
> > > > with "isolcpus=tick", it participates sched_domain.
> > >
> > > Frederic ?!? You can use nohz_full without isolcpus? That makes no
> > > sense. If you do that you get to keep the pieces.
> >
> > I fear you can yes, even though most users combine it with isolcpus. I
> > know, that interface is terrible but it dates from times when we weren't
> > sure about all the potential usecases of nohz_full. There was a possibility
> > that HPC could just want to reduce ticks without all the hard and costly
> > isolation around. But all the usecases I have witnessed so far in ten years
> > involved wanting 0 noise after all...
> 
> 
> If I make you annoyed I'm sorry in advance but let me clarify please.
> 
> 1. In case of none-HK-TICK-housekeeping cpu (a.k.a nohz_full cpu),
>     It should be on the null_domain. right?
> 
> 2. If (1) is true, when none-HK-TICK is set, should it set none-HK-DOMAIN
>     to prevent on any sched_domain (cpusets filter out none-HK-DOMAIN cpu)?
> 
> 3. If (1) is true, Is HK_SCHED still necessary? There seems to be no use case
>     and the check for this can be replaced by on_null_domain().

I've no idea about all those HK knobs, it's all insane if you ask me.

Frederic, afaict all the HK_ goo in kernel/sched/fair.c is total
nonsense, can you please explain?

If the CPU participates in load-balancing, it gets to fully participate.
If you want to get out of load-balancing, you get single CPU partitions.

  reply	other threads:[~2024-05-16 14:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 21:31 [PATCH] time/tick-sched: enable idle load balancing when nohz_full cpu becomes idle Levi Yun
2024-05-08  9:18 ` Markus Elfring
2024-05-09  9:59   ` Dan Carpenter
2024-05-08 17:26 ` [PATCH v2] time/tick-sched: " Levi Yun
2024-05-08 18:38   ` Markus Elfring
2024-05-08 19:15     ` Yun Levi
2024-05-08 19:22   ` [PATCH v3] " Levi Yun
2024-05-09  6:28     ` Markus Elfring
2024-05-09  7:26       ` Yun Levi
2024-05-09  8:16         ` Markus Elfring
2024-05-09  9:22           ` Yun Levi
2024-05-09  9:40             ` [v3] " Markus Elfring
2024-05-09  9:29   ` [PATCH v4] " Levi Yun
2024-05-09  9:55     ` [v4] " Markus Elfring
2024-05-15 16:41     ` [PATCH v4] " Yun Levi
2024-05-15 22:52     ` Frederic Weisbecker
2024-05-16  5:29       ` Yun Levi
2024-05-16  7:56       ` Peter Zijlstra
2024-05-16  8:20         ` Yun Levi
2024-05-16  8:49           ` Peter Zijlstra
2024-05-16 11:25             ` Frederic Weisbecker
2024-05-16 12:43               ` Yun Levi
2024-05-16 14:00                 ` Peter Zijlstra [this message]
2024-05-16 14:23                   ` Frederic Weisbecker
2024-05-16 14:45                     ` Peter Zijlstra
2024-05-16 15:02                       ` Frederic Weisbecker
2024-05-16 15:19                         ` Peter Zijlstra
2024-05-16 15:32                           ` Frederic Weisbecker
2024-05-16 16:12                             ` Yun Levi
2024-05-16 17:53                             ` Peter Zijlstra
2024-05-17 14:50                               ` 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=20240516140003.GJ22557@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Markus.Elfring@web.de \
    --cc=anna-maria@linutronix.de \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ppbuk5246@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=vineeth@bitbyteword.org \
    /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