summaryrefslogtreecommitdiffstats
path: root/fs/eventpoll.c
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-08-20 19:18:13 +0100
committerAndrew Morton <akpm@linux-foundation.org>2022-09-11 21:55:07 -0700
commitaa06a9bd853306c239f759018fb227d7e8f4e203 (patch)
tree1fe5f4e788106cf7a1b71adbd210d6cb9159ac12 /fs/eventpoll.c
parentcba7543e1515e79a85d37df85a0eb2cf0f07d115 (diff)
downloadlinux-aa06a9bd853306c239f759018fb227d7e8f4e203.tar.gz
linux-aa06a9bd853306c239f759018fb227d7e8f4e203.tar.bz2
linux-aa06a9bd853306c239f759018fb227d7e8f4e203.zip
ia64: fix clock_getres(CLOCK_MONOTONIC) to report ITC frequency
clock_gettime(CLOCK_MONOTONIC, &tp) is very precise on ia64 as it uses ITC (similar to rdtsc on x86). It's not quite a hrtimer as it is a few times slower than 1ns. Usually 2-3ns. clock_getres(CLOCK_MONOTONIC, &res) never reflected that fact and reported 0.04s precision (1/HZ value). In https://bugs.gentoo.org/596382 gstreamer's test suite failed loudly when it noticed precision discrepancy. Before the change: clock_getres(CLOCK_MONOTONIC, &res) reported 250Hz precision. After the change: clock_getres(CLOCK_MONOTONIC, &res) reports ITC (400Mhz) precision. The patch is based on matoro's fix. I added a bit of explanation why we need to special-case arch-specific clock_getres(). [akpm@linux-foundation.org: coding-style cleanups] Link: https://lkml.kernel.org/r/20220820181813.2275195-1-slyich@gmail.com Signed-off-by: Sergei Trofimovich <slyich@gmail.com> Cc: matoro <matoro_mailinglist_kernel@matoro.tk> Cc: Émeric Maschino <emeric.maschino@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/eventpoll.c')
0 files changed, 0 insertions, 0 deletions