All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Shreyas B Prabhu <shreyas@linux.vnet.ibm.com>
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 18:29:00 +0100	[thread overview]
Message-ID: <56CB455C.3050701@linaro.org> (raw)
In-Reply-To: <56CB22F5.8010808@linux.vnet.ibm.com>

On 02/22/2016 04:02 PM, Shreyas B Prabhu wrote:
> 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().

That is a good point but the function is not supposed to be called in 
the rcu_idle_enter/rcu_idle_exit section which is inside 
cpuidle_idle_call().


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  reply	other threads:[~2016-02-22 17:29 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
2016-02-22 17:29     ` Daniel Lezcano [this message]
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=56CB455C.3050701@linaro.org \
    --to=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=shreyas@linux.vnet.ibm.com \
    --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 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.