public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Joe Korty <joe.korty@ccur.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] make poll_idle behave more like the other idle methods
Date: Thu, 28 Aug 2008 15:33:35 +0200	[thread overview]
Message-ID: <20080828133335.GA1126@elte.hu> (raw)
In-Reply-To: <20080828132237.GA20926@tsunami.ccur.com>


* Joe Korty <joe.korty@ccur.com> wrote:

> On Thu, Aug 28, 2008 at 05:00:36AM -0400, Ingo Molnar wrote:
> > 
> > * Joe Korty <joe.korty@ccur.com> wrote:
> > 
> > > Make poll_idle() behave more like the other idle methods.
> > >
> > > Currently, poll_idle() returns immediately.  The other
> > > idle methods all wait indefinately for some condition
> > > to come true before returning.  poll_idle should emulate
> > > these other methods and also wait for a return condition,
> > > in this case, for need_resched() to become 'true'.
> > >
> > > Without this delay the idle loop spends all of its time
> > > in the outer loop that calls poll_idle.  This outer loop,
> > > these days, does real work, some of it under rcu locks.
> > > That work should only be done when idle is entered and
> > > when idle exits, not continuously while idle is spinning.
> > 
> > i'm wondering, what's the motivation, have you actually seen
> > anything bad/undesired happen due to that?
> 
> I saw the outer loop running continuously, from the old
> trace patch which I had applied.

ah - was that an older version of ftrace?

> Nowdays the outer loop runs the NO_HZ stuff, which touches
> quite a few memory locations.  Having say two cpus in idle
> and there is potential for cache thrashing to suck up a good
> part of the local memory bus bandwidth.
> 
> And I suspect as time goes on cpu_idle will end up with
> more work to do.

agreed.

	Ingo

  reply	other threads:[~2008-08-28 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 14:35 [PATCH] make poll_idle behave more like the other idle methods Joe Korty
2008-08-28  9:00 ` Ingo Molnar
2008-08-28 10:40   ` Thomas Gleixner
2008-08-28 13:22   ` Joe Korty
2008-08-28 13:33     ` Ingo Molnar [this message]
2008-08-28 15:19       ` Joe Korty

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=20080828133335.GA1126@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=joe.korty@ccur.com \
    --cc=linux-kernel@vger.kernel.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