mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Tony Lindgren <tony@atomide.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:50:07 -0800	[thread overview]
Message-ID: <1140742207.1271.67.camel@cog.beaverton.ibm.com> (raw)
In-Reply-To: <20060224004049.GD4578@atomide.com>

On Thu, 2006-02-23 at 16:40 -0800, Tony Lindgren wrote:
> * 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.

Also the above code just overwrites tv. 

Do you intend instead to add xtime to tv? 

thanks
-john



  reply	other threads:[~2006-02-24  0:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24  0:26 Tony Lindgren
2006-02-24  0:37 ` john stultz
2006-02-24  0:40   ` Tony Lindgren
2006-02-24  0:50     ` john stultz [this message]
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=1140742207.1271.67.camel@cog.beaverton.ibm.com \
    --to=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 \
    --cc=tony@atomide.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

all inboxes | Powered by JetHome®