linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Qian Cai <cai@lca.pw>, Thomas Gleixner <tglx@linutronix.de>,
	Waiman Long <longman@redhat.com>, x86 <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [tip: timers/core] Revert "tick/common: Make tick_periodic() check for missing ticks"
Date: Thu, 19 Mar 2020 18:54:22 -0000	[thread overview]
Message-ID: <158464406295.28353.3230662958771714087.tip-bot2@tip-bot2> (raw)

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     52da479a9aee630d2cdf37d05edfe5bcfff3e17f
Gitweb:        https://git.kernel.org/tip/52da479a9aee630d2cdf37d05edfe5bcfff3e17f
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Thu, 19 Mar 2020 19:47:06 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 19 Mar 2020 19:47:48 +01:00

Revert "tick/common: Make tick_periodic() check for missing ticks"

This reverts commit d441dceb5dce71150f28add80d36d91bbfccba99 due to
boot failures.

Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>
---
 kernel/time/tick-common.c | 36 +++---------------------------------
 1 file changed, 3 insertions(+), 33 deletions(-)

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index cce4ed1..7e5d352 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -16,7 +16,6 @@
 #include <linux/profile.h>
 #include <linux/sched.h>
 #include <linux/module.h>
-#include <linux/sched/clock.h>
 #include <trace/events/power.h>
 
 #include <asm/irq_regs.h>
@@ -85,41 +84,12 @@ int tick_is_oneshot_available(void)
 static void tick_periodic(int cpu)
 {
 	if (tick_do_timer_cpu == cpu) {
-		/*
-		 * Use running_clock() as reference to check for missing ticks.
-		 */
-		static ktime_t last_update;
-		ktime_t now;
-		int ticks = 1;
-
-		now = ns_to_ktime(running_clock());
 		write_seqlock(&jiffies_lock);
 
-		if (last_update) {
-			u64 delta = ktime_sub(now, last_update);
-
-			/*
-			 * Check for eventually missed ticks
-			 *
-			 * There is likely a persistent delta between
-			 * last_update and tick_next_period. So they are
-			 * updated separately.
-			 */
-			if (delta >= 2 * tick_period) {
-				s64 period = ktime_to_ns(tick_period);
-
-				ticks = ktime_divns(delta, period);
-			}
-			last_update = ktime_add(last_update,
-						ticks * tick_period);
-		} else {
-			last_update = now;
-		}
-
 		/* Keep track of the next tick event */
-		tick_next_period = ktime_add(tick_next_period,
-					     ticks * tick_period);
-		do_timer(ticks);
+		tick_next_period = ktime_add(tick_next_period, tick_period);
+
+		do_timer(1);
 		write_sequnlock(&jiffies_lock);
 		update_wall_time();
 	}

             reply	other threads:[~2020-03-19 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 18:54 tip-bot2 for Thomas Gleixner [this message]
2020-03-19 20:10 ` [tip: timers/core] Revert "tick/common: Make tick_periodic() check for missing ticks" Borislav Petkov

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=158464406295.28353.3230662958771714087.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=cai@lca.pw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).