From: Tony Lindgren <tony@atomide.com>
To: john stultz <johnstul@us.ibm.com>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Russell King <linux@arm.linux.org.uk>,
Con Kolivas <kernel@kolivas.org>
Subject: Re: [PATCH] Fix next_timer_interrupt() for hrtimer
Date: Thu, 23 Feb 2006 16:40:49 -0800 [thread overview]
Message-ID: <20060224004049.GD4578@atomide.com> (raw)
In-Reply-To: <1140741472.1271.64.camel@cog.beaverton.ibm.com>
* john stultz <johnstul@us.ibm.com> [060223 16:37]:
> On Thu, 2006-02-23 at 16:26 -0800, Tony Lindgren wrote:
> > + tv = ktime_to_timespec(event);
> > +
> > + /* Assume read xtime_lock is held, so we can't use getnstimeofday() */
> > + sec = xtime.tv_sec;
> > + nsec = xtime.tv_nsec;
> > + while (unlikely(nsec >= NSEC_PER_SEC)) {
> > + nsec -= NSEC_PER_SEC;
> > + ++sec;
> > + }
> > + tv.tv_sec = sec;
> > + tv.tv_nsec = nsec;
>
> Er, I think you should be able to nest readers. Thus getnstimeofday()
> should be safe to call. Or is the comment wrong and you are assuming a
> write lock is held?
Oops, it's a write lock as next_timer_interrupt gets called from
arch/*/time.c.
Tony
next prev parent reply other threads:[~2006-02-24 0:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-24 0:26 [PATCH] Fix next_timer_interrupt() for hrtimer Tony Lindgren
2006-02-24 0:37 ` john stultz
2006-02-24 0:40 ` Tony Lindgren [this message]
2006-02-24 0:50 ` john stultz
2006-02-24 1:10 ` Tony Lindgren
2006-02-25 0:43 ` Tony Lindgren
2006-02-25 2:22 ` Con Kolivas
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=20060224004049.GD4578@atomide.com \
--to=tony@atomide.com \
--cc=johnstul@us.ibm.com \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=schwidefsky@de.ibm.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