[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140116021003.GM10038@linux.vnet.ibm.com>
Date: Wed, 15 Jan 2014 18:10:03 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: linux-kernel@...r.kernel.org, mingo@...nel.org,
laijs@...fujitsu.com, dipankar@...ibm.com,
akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
josh@...htriplett.org, niv@...ibm.com, tglx@...utronix.de,
peterz@...radead.org, rostedt@...dmis.org, dhowells@...hat.com,
edumazet@...gle.com, darren@...art.com, fweisbec@...il.com,
sbw@....edu
Subject: Re: [PATCH 1/1] timers: internal_add_timer() should update
->next_timer if ->active_timers == 0
On Wed, Jan 15, 2014 at 06:31:37PM +0100, Oleg Nesterov wrote:
> internal_add_timer(timer) updates base->next_timer only if
> timer->expires < base->next_timer. This is correct, but it also
> makes sense to do the same if we add the first non-deferrable
> timer.
>
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
I have pulled this on in, thank you Oleg!
Thanx, Paul
> ---
> kernel/timer.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/timer.c b/kernel/timer.c
> index 6582b82..9492d57 100644
> --- a/kernel/timer.c
> +++ b/kernel/timer.c
> @@ -388,9 +388,9 @@ static void internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> * Update base->active_timers and base->next_timer
> */
> if (!tbase_get_deferrable(timer->base)) {
> - if (time_before(timer->expires, base->next_timer))
> + if (!base->active_timers++ ||
> + time_before(timer->expires, base->next_timer))
> base->next_timer = timer->expires;
> - base->active_timers++;
> }
> }
>
> --
> 1.5.5.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists