From: Shreyas B Prabhu <shreyas@linux.vnet.ibm.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: tglx@linutronix.de, peterz@infradead.org, rafael@kernel.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
nicolas.pitre@linaro.org, vincent.guittot@linaro.org
Subject: Re: [PATCH V3 2/2] sched: idle: IRQ based next prediction for idle period
Date: Mon, 22 Feb 2016 20:32:13 +0530 [thread overview]
Message-ID: <56CB22F5.8010808@linux.vnet.ibm.com> (raw)
In-Reply-To: <1455637383-14412-2-git-send-email-daniel.lezcano@linaro.org>
Hi Daniel,
On 02/16/2016 09:13 PM, Daniel Lezcano wrote:
> +
> +/**
> + * sched_idle_next_wakeup - Predict the next wakeup on the current cpu
> + *
> + * The next event on the cpu is based on a statistic approach of the
> + * interrupt events and the timer deterministic value. From the timer
> + * or the irqs, we return the one expected to occur first.
> + *
> + * Returns the expected remaining idle time before being woken up by
> + * an interruption.
> + */
> +s64 sched_idle_next_wakeup(void)
> +{
> + s64 next_timer = ktime_to_us(tick_nohz_get_sleep_length());
> + s64 next_irq = next_irq_event();
Since next_irq_event() uses RCU and we are in idle this should probably
be wrapped in RCU_NONIDLE().
> +
> + return min(next_irq, next_timer);
> +}
> +
Thanks,
Shreyas
next prev parent reply other threads:[~2016-02-22 15:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 15:43 [PATCH V3 1/2] irq: Track the interrupt timings Daniel Lezcano
2016-02-16 15:43 ` [PATCH V3 2/2] sched: idle: IRQ based next prediction for idle period Daniel Lezcano
2016-02-16 16:44 ` Nicolas Pitre
2016-02-17 23:09 ` Rafael J. Wysocki
2016-02-17 23:21 ` Rafael J. Wysocki
2016-02-18 10:25 ` Daniel Lezcano
2016-02-18 19:57 ` Rafael J. Wysocki
2016-02-19 15:01 ` Daniel Lezcano
2016-02-19 23:43 ` Rafael J. Wysocki
2016-02-23 9:49 ` Daniel Lezcano
2016-02-22 15:02 ` Shreyas B Prabhu [this message]
2016-02-22 17:29 ` Daniel Lezcano
2016-02-23 10:08 ` Shreyas B Prabhu
2016-02-23 10:06 ` Shreyas B Prabhu
2016-02-23 10:13 ` Daniel Lezcano
2016-02-16 16:45 ` [PATCH V3 1/2] irq: Track the interrupt timings Nicolas Pitre
2016-02-22 14:48 ` Shreyas B Prabhu
2016-02-22 17:24 ` 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=56CB22F5.8010808@linux.vnet.ibm.com \
--to=shreyas@linux.vnet.ibm.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).