All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andi Kleen <andi@firstfloor.org>
Cc: Venki Pallipadi <venkatesh.pallipadi@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Track accurate idle time with tick_sched.idle_sleeptime
Date: Sun, 2 Sep 2007 09:28:06 +0200	[thread overview]
Message-ID: <20070902072806.GC5075@elte.hu> (raw)
In-Reply-To: <p73bqcmvxc6.fsf@bingen.suse.de>


* Andi Kleen <andi@firstfloor.org> wrote:

> Venki Pallipadi <venkatesh.pallipadi@intel.com> writes:
> >  
> > +void tick_nohz_stop_idle(int cpu)
> > +{
> > +	struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
> > +
> > +	if (ts->idle_active) {
> > +		ktime_t now, delta;
> > +		now = ktime_get();
> 
> That could be PM timer read costing thousands of cycles.
> 
> For going into idle it's probably not a real problem, but it could 
> seriously affect out of idle latencies.

at least the current out-of-idle code already does what amounts to a 
PM-timer read when exiting from C2 or C3 mode. The 
sched_clock_idle_sleep_event() and sched_clock_idle_wakeup_event() 
callbacks utilize this already existing time information.

> You would really need a cheaper per CPU timer that doesn't stop in 
> idle (which rules out sched_clock). It's all unfortunately quite 
> messy.

yep.

	Ingo

  reply	other threads:[~2007-09-02  7:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 21:56 [PATCH] Track accurate idle time with tick_sched.idle_sleeptime Venki Pallipadi
2007-08-31 18:22 ` Ingo Molnar
2007-08-31 18:24   ` Ingo Molnar
2007-08-31 18:26     ` Pallipadi, Venkatesh
2007-09-01 22:23 ` Andi Kleen
2007-09-02  7:28   ` Ingo Molnar [this message]
2007-09-02  7:46     ` Andi Kleen
2007-09-02 10:02       ` Ingo Molnar
2007-09-10 18:59         ` Pallipadi, Venkatesh

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=20070902072806.GC5075@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@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 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.