From: matoro <matoro_mailinglist_kernel@matoro.tk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sergei Trofimovich <slyich@gmail.com>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org
Subject: Re: [PATCH] ia64: fix clock_getre(CLOCK_MONOTONIC) to report ITC frequency
Date: Wed, 17 Aug 2022 21:57:42 +0000 [thread overview]
Message-ID: <6d07209d000b671a3bc48003905652e8@matoro.tk> (raw)
In-Reply-To: <20220817122103.ecbd08bd545385e5bf8e0d72@linux-foundation.org>
Hi Andrew, I came up with the prototype for this patch, but it was based
entirely on Sergei's investigation which was documented in
https://bugs.gentoo.org/596382. I asked him to send it upstream because
I'm unable to attach my realname to it due to my job. I can place a
signed-off-by with my handle but I understand that's normally against
kernel policy which is why I didn't. Either way the bulk of the work
belongs to Sergei, I just scribbled it down, and he cleaned it up for
this submission.
-------- Original Message --------
Subject: Re: [PATCH] ia64: fix clock_getre(CLOCK_MONOTONIC) to report
ITC frequency
Date: 2022-08-17 15:21
From: Andrew Morton <akpm@linux-foundation.org>
To: Sergei Trofimovich <slyich@gmail.com>
On Mon, 15 Aug 2022 06:49:44 +0100 Sergei Trofimovich <slyich@gmail.com>
wrote:
> 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. It adds a bit of explanation why we
> need to special-case arch-specific clock_getres().
>
It would be best (and nice) to include the original developer's
Signed-off-by: and to Cc Émeric Maschino if possible?
Could you please take care of these paperwork issues?
WARNING: multiple messages have this Message-ID (diff)
From: matoro <matoro_mailinglist_kernel@matoro.tk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sergei Trofimovich <slyich@gmail.com>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org
Subject: Re: [PATCH] ia64: fix clock_getre(CLOCK_MONOTONIC) to report ITC frequency
Date: Wed, 17 Aug 2022 17:57:42 -0400 [thread overview]
Message-ID: <6d07209d000b671a3bc48003905652e8@matoro.tk> (raw)
In-Reply-To: <20220817122103.ecbd08bd545385e5bf8e0d72@linux-foundation.org>
Hi Andrew, I came up with the prototype for this patch, but it was based
entirely on Sergei's investigation which was documented in
https://bugs.gentoo.org/596382. I asked him to send it upstream because
I'm unable to attach my realname to it due to my job. I can place a
signed-off-by with my handle but I understand that's normally against
kernel policy which is why I didn't. Either way the bulk of the work
belongs to Sergei, I just scribbled it down, and he cleaned it up for
this submission.
-------- Original Message --------
Subject: Re: [PATCH] ia64: fix clock_getre(CLOCK_MONOTONIC) to report
ITC frequency
Date: 2022-08-17 15:21
From: Andrew Morton <akpm@linux-foundation.org>
To: Sergei Trofimovich <slyich@gmail.com>
On Mon, 15 Aug 2022 06:49:44 +0100 Sergei Trofimovich <slyich@gmail.com>
wrote:
> 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. It adds a bit of explanation why we
> need to special-case arch-specific clock_getres().
>
It would be best (and nice) to include the original developer's
Signed-off-by: and to Cc Émeric Maschino if possible?
Could you please take care of these paperwork issues?
next prev parent reply other threads:[~2022-08-17 21:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 5:49 [PATCH] ia64: fix clock_getre(CLOCK_MONOTONIC) to report ITC frequency Sergei Trofimovich
2022-08-15 5:49 ` Sergei Trofimovich
2022-08-17 19:21 ` Andrew Morton
2022-08-17 19:21 ` Andrew Morton
2022-08-17 21:57 ` matoro [this message]
2022-08-17 21:57 ` matoro
2022-08-20 22:14 ` Andrew Morton
2022-08-20 22:14 ` Andrew Morton
2022-09-10 17:50 ` [PATCH v3] ia64: fix clock_getres(CLOCK_MONOTONIC) " Sergei Trofimovich
2022-09-10 17:50 ` Sergei Trofimovich
2022-08-20 18:17 ` [PATCH] ia64: fix clock_getre(CLOCK_MONOTONIC) " Sergei Trofimovich
2022-08-20 18:17 ` Sergei Trofimovich
2022-08-20 18:18 ` [PATCH v2] ia64: fix clock_getres(CLOCK_MONOTONIC) " Sergei Trofimovich
2022-08-20 18:18 ` Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2022-08-16 8:09 [PATCH] ia64: fix clock_getre(CLOCK_MONOTONIC) " kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d07209d000b671a3bc48003905652e8@matoro.tk \
--to=matoro_mailinglist_kernel@matoro.tk \
--cc=akpm@linux-foundation.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slyich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.