android_kernel_xiaomi_sm8350/arch/s390/kernel
Jan Glauber 9dbafa5368 [PATCH] s390: overflow in sched_clock
The least significant bit of the TOD clock value returned by get_clock
is the 4096th part of a microsecond. To get to nanoseconds the value
needs to be divided by 4096 and multiplied with 1000.

The current method multiplies first and then shifts the value to make the
result as precise as possible.  The disadvantage is that the multiplication
with 1000 will overflow shortly after 52 days.  sched_clock is used by the
scheduler for time stamp deltas, if an overflow occurs between two time stamps
the scheduler will get confused.

With the patch the problem occurs only after approx.  one year, so the chance
to run into this overflow is extremly low.

Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01 08:53:23 -08:00
..
asm-offsets.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
binfmt_elf32.c [PATCH] s390: task_pt_regs() 2006-01-12 09:08:54 -08:00
bitmap.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
compat_exec_domain.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
compat_linux.c [PATCH] capable/capability.h (arch/) 2006-01-11 18:42:14 -08:00
compat_linux.h [PATCH] compat: introduce compat_time_t 2005-06-23 09:45:32 -07:00
compat_ptrace.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
compat_signal.c [PATCH] s390: rt_sigreturn fix 2006-01-06 08:33:49 -08:00
compat_wrapper.S [PATCH] common compat_sys_timer_create 2006-01-10 08:01:32 -08:00
cpcmd.c [PATCH] s390: cleanup Kconfig 2006-01-06 08:33:53 -08:00
crash.c [PATCH] kdump: dynamic per cpu allocation of memory for saving cpu registers 2006-01-10 08:01:26 -08:00
debug.c [PATCH] s390: "extern inline" -> "static inline" 2005-11-09 07:55:52 -08:00
ebcdic.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
entry64.S [PATCH] s390: cleanup Kconfig 2006-01-06 08:33:53 -08:00
entry.S [PATCH] s390: signal delivery 2005-11-07 07:53:32 -08:00
head31.S [PATCH] s390: merge common parts of head.S and head64.S 2005-11-07 07:53:34 -08:00
head64.S [PATCH] s390: merge common parts of head.S and head64.S 2005-11-07 07:53:34 -08:00
head.S [PATCH] s390: cleanup Kconfig 2006-01-06 08:33:53 -08:00
init_task.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
machine_kexec.c [PATCH] s390: atomic primitives 2006-01-06 08:33:48 -08:00
Makefile [PATCH] sanitize building of fs/compat_ioctl.c 2006-01-10 08:01:33 -08:00
module.c [PATCH] s390: cleanup Kconfig 2006-01-06 08:33:53 -08:00
process.c [PATCH] s390: show_task oops 2006-01-14 18:27:08 -08:00
profile.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ptrace.c [PATCH] s390: task_pt_regs() 2006-01-12 09:08:54 -08:00
reipl64.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
reipl_diag.c [PATCH] s390: cleanup Kconfig 2006-01-06 08:33:53 -08:00
reipl.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
relocate_kernel64.S [PATCH] s390: kexec fixes and improvements. 2005-08-01 21:37:59 -07:00
relocate_kernel.S [PATCH] s390: kexec fixes and improvements. 2005-08-01 21:37:59 -07:00
s390_ext.c [PATCH] s390: external call performance 2005-07-27 16:26:04 -07:00
s390_ksyms.c [PATCH] don't include ioctl32.h in drivers 2006-01-10 08:01:34 -08:00
semaphore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup.c [PATCH] s390: add dummy pm_power_off 2006-01-14 18:27:09 -08:00
signal.c [PATCH] s390: cleanup Kconfig 2006-01-06 08:33:53 -08:00
smp.c [PATCH] s390: task_stack_page() 2006-01-12 09:08:54 -08:00
sys_s390.c [PATCH] s390: cleanup Kconfig 2006-01-06 08:33:53 -08:00
syscalls.S [PATCH] s390: ioprio & inotify system calls. 2005-08-01 21:37:59 -07:00
time.c [PATCH] s390: overflow in sched_clock 2006-02-01 08:53:23 -08:00
traps.c [PATCH] s390: task_stack_page() 2006-01-12 09:08:54 -08:00
vmlinux.lds.S [PATCH] s390: cleanup Kconfig 2006-01-06 08:33:53 -08:00
vtime.c [PATCH] s390: cputime misaccounting 2006-01-14 18:27:09 -08:00