All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Peter Zijlstra <peterz@infradead.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, bmb@athenacr.com, hpa@zytor.com,
	mingo@redhat.com, torvalds@linux-foundation.org,
	a.p.zijlstra@chello.nl, efault@gmx.de, peterz@infradead.org,
	jkosina@suse.cz, alan@lxorguk.ukuu.org.uk, jefdriesen@telenet.be,
	hirofumi@mail.parknet.co.jp, gregkh@suse.de, tglx@linutronix.de,
	cw@f00f.org
Subject: [tip:timers/urgent] nohz: Fix nohz ratelimit
Date: Thu, 17 Jun 2010 17:39:39 GMT	[thread overview]
Message-ID: <tip-3310d4d38fbc514e7b18bd3b1eea8effdd63b5aa@git.kernel.org> (raw)
In-Reply-To: <1276790557.27822.516.camel@twins>

Commit-ID:  3310d4d38fbc514e7b18bd3b1eea8effdd63b5aa
Gitweb:     http://git.kernel.org/tip/3310d4d38fbc514e7b18bd3b1eea8effdd63b5aa
Author:     Peter Zijlstra <peterz@infradead.org>
AuthorDate: Thu, 17 Jun 2010 18:02:37 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 17 Jun 2010 19:37:29 +0200

nohz: Fix nohz ratelimit

Chris Wedgwood reports that 39c0cbe (sched: Rate-limit nohz) causes a
serial console regression, unresponsiveness, and indeed it does. The
reason is that the nohz code is skipped even when the tick was already
stopped before the nohz_ratelimit(cpu) condition changed.

Move the nohz_ratelimit() check to the other conditions which prevent
long idle sleeps.

Reported-by: Chris Wedgwood <cw@f00f.org>
Tested-by: Brian Bloniarz <bmb@athenacr.com>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg KH <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Jef Driesen <jefdriesen@telenet.be>
LKML-Reference: <1276790557.27822.516.camel@twins>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/time/tick-sched.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 1d7b9bc..783fbad 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -315,9 +315,6 @@ void tick_nohz_stop_sched_tick(int inidle)
 		goto end;
 	}
 
-	if (nohz_ratelimit(cpu))
-		goto end;
-
 	ts->idle_calls++;
 	/* Read jiffies and the time when jiffies were updated last */
 	do {
@@ -328,7 +325,7 @@ void tick_nohz_stop_sched_tick(int inidle)
 	} while (read_seqretry(&xtime_lock, seq));
 
 	if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) ||
-	    arch_needs_cpu(cpu)) {
+	    arch_needs_cpu(cpu) || nohz_ratelimit(cpu)) {
 		next_jiffies = last_jiffies + 1;
 		delta_jiffies = 1;
 	} else {

  reply	other threads:[~2010-06-17 17:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 17:25 Slow pty's (was Re: libdivecomputer interfaces?) Linus Torvalds
2010-06-10 18:07 ` OGAWA Hirofumi
2010-06-10 18:10 ` Chris Wedgwood
2010-06-10 22:25   ` Brian Bloniarz
2010-06-10 22:30     ` Linus Torvalds
2010-06-16 15:03     ` Jiri Kosina
2010-06-16 15:16       ` Mike Galbraith
2010-06-17  6:39         ` Mike Galbraith
2010-06-17  7:00           ` Mike Galbraith
2010-06-17 10:50             ` Mike Galbraith
2010-06-17 13:24               ` Peter Zijlstra
2010-06-17 14:11                 ` Thomas Gleixner
2010-06-17 14:14                 ` Mike Galbraith
2010-06-17 14:56                 ` Brian Bloniarz
2010-06-17 16:02                   ` [PATCH] nohz: Fix nohz ratelimit Peter Zijlstra
2010-06-17 17:39                     ` tip-bot for Peter Zijlstra [this message]
2010-11-12 18:45 ` Slow pty's (was Re: libdivecomputer interfaces?) Jef Driesen

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=tip-3310d4d38fbc514e7b18bd3b1eea8effdd63b5aa@git.kernel.org \
    --to=peterz@infradead.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bmb@athenacr.com \
    --cc=cw@f00f.org \
    --cc=efault@gmx.de \
    --cc=gregkh@suse.de \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=hpa@zytor.com \
    --cc=jefdriesen@telenet.be \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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.