mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Youquan,Song" <youquan.song@linux.intel.com>
To: hpa@zytor.com, tglx@linutronix.de, akpm@linux-foundation.org
Cc: venkatesh.pallipadi@intel.com, suresh.b.siddha@intel.com,
	kent.liu@intel.com, chaohong.guo@intel.com,
	youquan.song@intel.com, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH]tickless: Fix tick nohz timer irq0 fail to increaase
Date: Mon, 4 Jan 2010 05:49:05 -0500	[thread overview]
Message-ID: <20100104104905.GA30574@youquan-linux.bj.intel.com> (raw)
In-Reply-To: <20091214130233.GA3898@youquan-linux.bj.intel.com>

Tickless is disabled by nohz=off, which is used in OSVs. But in current kernel,
if tickless is disabled, the timer irq0 will not increase. Because the timer 
event handler should be tick_handle_periodic, but actually event handler keep 
as tick_handle_oneshot_broadcast which is used in tickless. The root cause is
that it is default to enable high resolution timer which will force to oneshot
 broadcast mode.

This patch add tickless enable check before enable high resolution timer

On Nehalem-EX:

Before the patch:
linux-a25n:~ # cat /proc/interrupts | grep timer
   0:        334          0          0          0          0          0 ....
 LOC:     192248     193931     193851     184441     193803     193625 ....

After the patch:
cat /proc/interrupts | grep timer
   0:     223788          0          0          0          0          0 ....
 LOC:      13081     238407     238452     229405     238298     235688 ....

Signed-off-by: Youquan, Song <youquan.song@intel.com>
---


diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index f992762..a515bed 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -815,7 +815,7 @@ int tick_check_oneshot_change(int allow_nohz)
 	if (!timekeeping_valid_for_hres() || !tick_is_oneshot_available())
 		return 0;
 
-	if (!allow_nohz)
+	if (!allow_nohz && tick_nohz_enabled)
 		return 1;
 
 	tick_nohz_switch_to_nohz();

       reply	other threads:[~2010-01-04  3:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20091214130233.GA3898@youquan-linux.bj.intel.com>
2010-01-04 10:49 ` Youquan,Song [this message]
2010-01-04 12:36   ` Arjan van de Ven
2010-01-04 14:00     ` Peter Zijlstra
2010-01-04 22:02       ` Youquan,Song
2010-01-04 21:40     ` Youquan,Song

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=20100104104905.GA30574@youquan-linux.bj.intel.com \
    --to=youquan.song@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=chaohong.guo@intel.com \
    --cc=hpa@zytor.com \
    --cc=kent.liu@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=youquan.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome