Comment 9 for bug 805341

Revision history for this message
Fumihito YOSHIDA (hito) wrote :

This problem has been fixed at mainline/longterm-2.6.32.50 ?

https://www.kernel.org/pub/linux/kernel/v2.6/longterm/ChangeLog-2.6.32.50
| commit e52d3fb7c83d6cb569f343a3db9b45decc801f59
| Author: Salman Qazi <email address hidden>
| Date: Tue Nov 15 14:12:06 2011 -0800
|
| sched, x86: Avoid unnecessary overflow in sched_clock
|
| commit 4cecf6d401a01d054afc1e5f605bcbfe553cb9b9 upstream.
|
| In hundreds of days, the __cycles_2_ns calculation in sched_clock
| has an overflow. cyc * per_cpu(cyc2ns, cpu) exceeds 64 bits, causing
| the final value to become zero. We can solve this without losing
| any precision.
|
| We can decompose TSC into quotient and remainder of division by the
| scale factor, and then use this to convert TSC into nanoseconds.