mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Stanislaw Gruszka <stf_xl@wp.pl>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	stf_xl@wp.pl, tglx@linutronix.de
Subject: [tip:timers/urgent] hrtimer: Avoid double seqlock
Date: Wed, 26 May 2010 14:19:08 GMT	[thread overview]
Message-ID: <tip-174bd1994ec67a6e6191c4ed8e5dac17fa221b84@git.kernel.org> (raw)
In-Reply-To: <20100525214912.GA1934@r2bh72.net.upc.cz>

Commit-ID:  174bd1994ec67a6e6191c4ed8e5dac17fa221b84
Gitweb:     http://git.kernel.org/tip/174bd1994ec67a6e6191c4ed8e5dac17fa221b84
Author:     Stanislaw Gruszka <stf_xl@wp.pl>
AuthorDate: Tue, 25 May 2010 23:49:12 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 26 May 2010 16:15:37 +0200

hrtimer: Avoid double seqlock

hrtimer_get_softirq_time() has it's own xtime lock protection, so it's
safe to use plain __current_kernel_time() and avoid the double seqlock
loop.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
LKML-Reference: <20100525214912.GA1934@r2bh72.net.upc.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 kernel/hrtimer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index b9b134b..5c69e99 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -89,7 +89,7 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
 
 	do {
 		seq = read_seqbegin(&xtime_lock);
-		xts = current_kernel_time();
+		xts = __current_kernel_time();
 		tom = wall_to_monotonic;
 	} while (read_seqretry(&xtime_lock, seq));
 

      reply	other threads:[~2010-05-26 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 21:49 hrtimer: avoid " Stanislaw Gruszka
2010-05-26 14:19 ` tip-bot for Stanislaw Gruszka [this message]

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-174bd1994ec67a6e6191c4ed8e5dac17fa221b84@git.kernel.org \
    --to=stf_xl@wp.pl \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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