mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Loehle <christian.loehle@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Wei Gao <wegao@suse.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Thomas Gleixner <tglx@kernel.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] sched/cputime: Preserve iowait accounting across waking interrupts in dyntick-idle
Date: Thu, 15 Oct 2026 09:24:07 +0100	[thread overview]
Message-ID: <a6cc5f59-da1a-4e8a-b91f-f32743b02383@arm.com> (raw)
In-Reply-To: <20261015073508.GH4121339@noisy.programming.kicks-ass.net>

On 10/15/26 08:35, Peter Zijlstra wrote:
> On Wed, Oct 14, 2026 at 02:17:52PM +0100, Christian Loehle wrote:
> 
>>> Using nr_iowait_cpu() is fundamentally never a fix. It is rolling a dice
>>> and liking random numbers. See the comment that goes with that function.
>>>
>> Speaking of, that comment is stale, menu doesn't use that heuristic anymore.
> 
> \o/
> 
>> FWIW the remaining aggregated nr_iowait users seem to be accounting/reporting.
>> (cpufreq still uses it, but it comes directly from p->in_iowait).
> 
> I see: get_cpu_iowait_time_us() using nr_cpuwait_cpu(), which in turn is
> used for both thermal and cpufreq.

thermal uses it with io_is_busy=0, so that's okay, ondemand has it sysfs-exposed
with a default of 0 except for 
	return (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
		boot_cpu_data.x86_vfm >= INTEL_PENTIUM_PRO);

:/

If that were the only users I'm sure there would be ways around it though.

> 
>> Given they are exported (/proc/stat procs_blocked and something in s390) I don't
>> see how we can remove this entirely but at least nr_iowait_cpu() as opposed
>> to cpu_has_iowait() could be refactored. The issues are obviously the same still.
>> I'll send a patch.
> 
> Right.
> 
>> Peter, if you see a path to ever retire iowait (or at least the CPU iowait for now),
>> I'm more than happy to sink some time into it...
> 
> Given the exposure in /proc I'm not sure we can *ever* fully get rid of
> the per-cpu usage of iowait, but yeah, reducing in-kernel consumers of
> this number might be somewhat feasible.


  reply	other threads:[~2026-10-15  8:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  1:52 Wei Gao
2026-10-14 12:49 ` Peter Zijlstra
2026-10-14 13:17   ` Christian Loehle
2026-10-15  7:35     ` Peter Zijlstra
2026-10-15  8:24       ` Christian Loehle [this message]
2026-10-15  2:28   ` Wei Gao
2026-10-14 14:14 ` Christian Loehle
2026-10-15  2:40   ` Wei Gao

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=a6cc5f59-da1a-4e8a-b91f-f32743b02383@arm.com \
    --to=christian.loehle@arm.com \
    --cc=axboe@kernel.dk \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=io-uring@vger.kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=wegao@suse.com \
    /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®