From: Peter Zijlstra <peterz@infradead.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM <linux-pm@vger.kernel.org>,
Giovanni Gherdovich <ggherdovich@suse.cz>,
Doug Smythies <dsmythies@telus.net>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Mel Gorman <mgorman@suse.de>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Nicolas Pitre <nicolas.pitre@linaro.org>
Subject: [RFC][PATCH] irq/timings: Ignore predictions in the past
Date: Wed, 7 Nov 2018 11:09:08 +0100 [thread overview]
Message-ID: <20181107100908.GJ9781@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJZ5v0iPs8Wt0PneBVWptqJPP6dEze+=GvxjU=dHBRbmty+kOw@mail.gmail.com>
On Wed, Nov 07, 2018 at 12:39:31AM +0100, Rafael J. Wysocki wrote:
> In general, however, I need to be convinced that interrupts that
> didn't wake up the CPU from idle are relevant for next wakeup
> prediction.
So you're worried about the case where we're 100% busy and generating IO
interrupts (disk, network, etc..) and then go idle and those interrupts
stop happening, but we'll base a prediction off of them?
Any predictor will have some of those trancients, but note that we'll
only actually train the irq timing thing when here is idle time. If
we're 100% busy, we'll never actually consume the data.
Also, I think the below delta (on top of my earlier patch) would make
sense; as I don't see how the current code makes sense there.
--- a/kernel/irq/timings.c
+++ b/kernel/irq/timings.c
@@ -306,22 +306,17 @@ u64 irq_timings_next_event(u64 now)
continue;
if (irqs->next_evt <= now) {
- irq = i;
- next_evt = now;
-
/*
- * This interrupt mustn't use in the future
- * until new events occur and update the
- * statistics.
+ * If the last prediction was in the past, mark the IRQ
+ * as invalid until a next interrupt updates the
+ * prediction.
*/
irqs->valid = 0;
- break;
+ continue;
}
- if (irqs->next_evt < next_evt) {
- irq = i;
+ if (irqs->next_evt < next_evt)
next_evt = irqs->next_evt;
- }
}
return next_evt;
next prev parent reply other threads:[~2018-11-07 10:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-04 16:31 [RFC/RFT][PATCH v3] cpuidle: New timer events oriented governor for tickless systems Rafael J. Wysocki
2018-11-05 19:32 ` Giovanni Gherdovich
2018-11-06 14:55 ` Rafael J. Wysocki
2018-11-06 17:04 ` Peter Zijlstra
2018-11-06 18:19 ` Rafael J. Wysocki
2018-11-06 19:51 ` Peter Zijlstra
2018-11-06 23:39 ` Rafael J. Wysocki
2018-11-07 8:59 ` Peter Zijlstra
2018-11-07 9:46 ` [PATCH] irq/timings: Fix model validity Peter Zijlstra
2018-11-07 10:52 ` Daniel Lezcano
2018-11-07 13:05 ` Peter Zijlstra
2018-11-08 8:10 ` Daniel Lezcano
2018-11-07 12:09 ` [RFC/RFT][PATCH v3] cpuidle: New timer events oriented governor for tickless systems Rafael J. Wysocki
2018-11-07 10:09 ` Peter Zijlstra [this message]
2018-11-07 10:13 ` Daniel Lezcano
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=20181107100908.GJ9781@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=daniel.lezcano@linaro.org \
--cc=dsmythies@telus.net \
--cc=frederic@kernel.org \
--cc=ggherdovich@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=nicolas.pitre@linaro.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.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