All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: rjw@rjwysocki.net, tglx@linutronix.de
Cc: ulf.hansson@linaro.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] IRQ next prediction and mbed governor
Date: Fri,  8 Mar 2019 22:20:44 +0100	[thread overview]
Message-ID: <20190308212047.28767-1-daniel.lezcano@linaro.org> (raw)

The following patchset provides the missing bits to predict the next
event on the the current CPU by identifying three categories of wakeup
sources, the interrupts from the devices, the timers and the IPI
rescheduling.

Initially, the interrupt prediction was based on the statistical
normal law, discarding interrupt intervals out of the gaussian curve,
thus allowing to predict only interrupts coming in regular intervals.
Unfortunately this approach prevents to handle any kind of irregular
intervals, closing the door for more accuracy in the prediction.

With a derived array suffixes algorithm, it is possible to quickly
detect the repeating patterns in less than 1us per interrupt on x86.

The algorithm is described in the documentation. It is simple in
in apparence but it needs some attention to understand how it allows
to detect the pattern and return a guess estimate of the next event.

And finally, a new cpuidle governor is added to make use of these
predictions for the different wake up sources but targetting embedded
systems.

Daniel Lezcano (3):
  genirq/timings: Remove variance computation code
  genirq/timings: Add array suffix computation code
  cpuidle/drivers/mbed: Add new governor for embedded systems

 drivers/cpuidle/Kconfig            |  11 +-
 drivers/cpuidle/governors/Makefile |   1 +
 drivers/cpuidle/governors/mbed.c   | 143 +++++++++
 kernel/irq/timings.c               | 488 +++++++++++++++++++----------
 4 files changed, 485 insertions(+), 158 deletions(-)
 create mode 100644 drivers/cpuidle/governors/mbed.c

-- 
2.17.1


             reply	other threads:[~2019-03-08 21:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 21:20 Daniel Lezcano [this message]
2019-03-08 21:20 ` [PATCH 1/3] genirq/timings: Remove variance computation code Daniel Lezcano
2019-03-08 21:20 ` [PATCH 2/3] genirq/timings: Add array suffix " Daniel Lezcano
2019-03-24 17:44   ` Thomas Gleixner
2019-03-26 15:22     ` Daniel Lezcano
2019-03-26 16:04       ` Thomas Gleixner
2019-03-08 21:20 ` [PATCH 3/3] cpuidle/drivers/mbed: Add new governor for embedded systems Daniel Lezcano
2019-04-02 13:22   ` Quentin Perret
2019-04-02 16:02     ` Daniel Lezcano
2019-04-02 16:26       ` Quentin Perret

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=20190308212047.28767-1-daniel.lezcano@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.