[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5050A1D8.5080104@redhat.com>
Date: Wed, 12 Sep 2012 10:53:12 -0400
From: Prarit Bhargava <prarit@...hat.com>
To: John Stultz <john.stultz@...aro.org>
CC: Linux Kernel <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Richard Cochran <richardcochran@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Daniel Lezcano <daniel.lezcano@...aro.org>
Subject: Re: [PATCH] time: Fix timeekeping_get_ns overflow on 32bit systems
On 09/11/2012 07:26 PM, John Stultz wrote:
> Thomas: Please queue this in tip/timers/urgent for 3.6.
>
> Daniel Lezcano reported seeing multi-second stalls from
> keyboard input on his T61 laptop when NOHZ and CPU_IDLE
> were enabled on a 32bit kernel.
>
> He bisected the problem down to
> 1e75fa8be9fb61e1af46b5b3b176347a4c958ca1 (time: Condense
> timekeeper.xtime into xtime_sec).
>
> After reproducing this issue, I narrowed the problem down
> to the fact that timekeeping_get_ns() returns a 64bit
> nsec value that hasn't been accumulated. In some cases
> this value was being then stored in timespec.tv_nsec
> (which is a long).
>
> On 32bit systems, With idle times larger then 4 seconds
> (or less, depending on the value of xtime_nsec), the
> returned nsec value would overflow 32bits. This limited
> kept time from increasing, causing timers to not expire.
>
> The fix is to make sure we don't directly store the
> result of timekeeping_get_ns() into a tv_nsec field,
> instead using a 64bit nsec value which can then be
> added into the timespec via timespec_add_ns().
>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Richard Cochran <richardcochran@...il.com>
> Cc: Prarit Bhargava <prarit@...hat.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
> Reported-and-bisected-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> Tested-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> Signed-off-by: John Stultz <john.stultz@...aro.org>
Acked-by: Prarit Bhargava <prarit@...hat.com>
P.
--
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