public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [patch 2/4] timers: Consolidate base->next_timer update
Date: Tue, 29 May 2012 16:05:12 +0530	[thread overview]
Message-ID: <87fwajxokf.fsf@abhimanyu.in.ibm.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1205291137580.3231@ionos>

On Tue, 29 May 2012 11:38:27 +0200 (CEST), Thomas Gleixner <tglx@linutronix.de> wrote:
> On Tue, 29 May 2012, Nikunj A Dadhania wrote:
> 
> > > 
> > > -static void internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> > > +static void
> > > +__internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> > >  {
> > >  	unsigned long expires = timer->expires;
> > >  	unsigned long idx = expires - base->timer_jiffies;
> > > @@ -372,6 +373,17 @@ static void internal_add_timer(struct tv
> > >  	list_add_tail(&timer->entry, vec);
> > >  }
> > > 
> > > +static void internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> > > +{
> > > +	__internal_add_timer(base, timer);
> > > +	/*
> > > +	 * Update base->next_timer if this is the earliest one.
> > > +	 */
> > > +	if (time_before(timer->expires, base->next_timer) &&
> > > +	    !tbase_get_deferrable(timer->base))
> > > +		base->next_timer = timer->expires;
> > > +}
> > > +
> > >
> > Shouldn't this be like this?
> > 
> > +	/*
> > +	 * Update base->next_timer if this is the earliest one.
> > +	 */
> > +	if (time_before(timer->expires, base->next_timer) &&
> > +	    !tbase_get_deferrable(timer->base))
> > +		base->next_timer = timer->expires;
> > +	__internal_add_timer(base, timer);
> > 
> > As per the below code?
> 
> And why should this matter?
> 
Yes it does not matter, sorry for the noise.

Looking at the internal_add_timer(), there is no such dependency. I was
thinking that the base->next_timer is changed and would be used in
__internal_add_timer.

Nikunj




  reply	other threads:[~2012-05-29 10:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 22:08 [patch 0/4] timers: Fix get_next_timer_interrupt() proper Thomas Gleixner
2012-05-25 22:08 ` [patch 1/4] timers: Create detach_if_pending() and use it Thomas Gleixner
2012-06-06 11:58   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2012-05-25 22:08 ` [patch 2/4] timers: Consolidate base->next_timer update Thomas Gleixner
2012-05-29  6:34   ` Nikunj A Dadhania
2012-05-29  9:38     ` Thomas Gleixner
2012-05-29 10:35       ` Nikunj A Dadhania [this message]
2012-06-06 11:59   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2012-05-25 22:08 ` [patch 3/4] timers: Add accounting of non deferrable timers Thomas Gleixner
2012-06-06 12:00   ` [tip:timers/core] " tip-bot for Thomas Gleixner
2012-05-25 22:08 ` [patch 4/4] timers: Improve get_next_timer_interrupt() Thomas Gleixner
2012-06-06 12:01   ` [tip:timers/core] " tip-bot for Thomas Gleixner

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=87fwajxokf.fsf@abhimanyu.in.ibm.com \
    --to=nikunj@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=gilad@benyossef.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --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