* high precision timers
@ 2021-05-02 14:10 Hyeonggon Yoo
2021-05-02 14:54 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Hyeonggon Yoo @ 2021-05-02 14:10 UTC (permalink / raw)
To: kernelnewbies
the 'timer wheel' - which has low resolution works at jiffy resolution.
so usually it has precision of 1~10ms.
and there's high resolution timers in kernel to have nanosecond resolution,
but it doesn't seem to have nanosecond precision
is there a way to deal with high precision timers in kernel?
does it require specific hardware?
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: high precision timers
2021-05-02 14:10 high precision timers Hyeonggon Yoo
@ 2021-05-02 14:54 ` Greg KH
[not found] ` <CAB=+i9TRO_KUMuHb5ozwQqXjoRKV+4+JtgQEdrgNh-eK1vivBA@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-05-02 14:54 UTC (permalink / raw)
To: Hyeonggon Yoo; +Cc: kernelnewbies
On Sun, May 02, 2021 at 11:10:11PM +0900, Hyeonggon Yoo wrote:
> the 'timer wheel' - which has low resolution works at jiffy resolution.
> so usually it has precision of 1~10ms.
>
> and there's high resolution timers in kernel to have nanosecond resolution,
> but it doesn't seem to have nanosecond precision
>
> is there a way to deal with high precision timers in kernel?
What exactly are you needing here? And do you have hardware that
provides both high precision and high resolution?
thanks,
greg k-h
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: high precision timers
[not found] ` <CAB=+i9TRO_KUMuHb5ozwQqXjoRKV+4+JtgQEdrgNh-eK1vivBA@mail.gmail.com>
@ 2021-05-03 11:13 ` Valdis Klētnieks
[not found] ` <CAB=+i9RVEvEBJVYz-MkMAtZHhsNbr4a88CCVmjkpQ4WevWWxkQ@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Valdis Klētnieks @ 2021-05-03 11:13 UTC (permalink / raw)
To: Hyeonggon Yoo; +Cc: Greg KH, kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 271 bytes --]
On Mon, 03 May 2021 00:56:17 +0900, Hyeonggon Yoo said:
> I mean, is there an API that guarantees high precision (non architecture
> dependent way)
How do you guarantee high precision if you're on hardware that doesn't
provide a high precision/resolution timer?
[-- Attachment #1.2: Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: high precision timers
[not found] ` <CAB=+i9RVEvEBJVYz-MkMAtZHhsNbr4a88CCVmjkpQ4WevWWxkQ@mail.gmail.com>
@ 2021-05-03 15:15 ` loïc tourlonias
0 siblings, 0 replies; 4+ messages in thread
From: loïc tourlonias @ 2021-05-03 15:15 UTC (permalink / raw)
To: Hyeonggon Yoo; +Cc: Greg KH, Valdis Klētnieks, kernelnewbies
[-- Attachment #1.1: Type: text/plain, Size: 916 bytes --]
Hi
On Mon, May 3, 2021 at 2:16 PM Hyeonggon Yoo <42.hyeyoo@gmail.com> wrote:
> Greg, and Valdis Thank you so much! It helped a lot!
>
> I thought there would be a way to do it because of high resolution.
>
> 2021년 5월 3일 (월) 오후 8:13, Valdis Klētnieks <valdis.kletnieks@vt.edu>님이 작성:
>
>> On Mon, 03 May 2021 00:56:17 +0900, Hyeonggon Yoo said:
>>
>> > I mean, is there an API that guarantees high precision (non architecture
>> > dependent way)
>>
>> How do you guarantee high precision if you're on hardware that doesn't
>> provide a high precision/resolution timer?
>>
>
If you don't have any hardware support, the Linux kernel can't magically
count faster than its system tick. ^^
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
[-- Attachment #1.2: Type: text/html, Size: 2102 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-03 15:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-02 14:10 high precision timers Hyeonggon Yoo
2021-05-02 14:54 ` Greg KH
[not found] ` <CAB=+i9TRO_KUMuHb5ozwQqXjoRKV+4+JtgQEdrgNh-eK1vivBA@mail.gmail.com>
2021-05-03 11:13 ` Valdis Klētnieks
[not found] ` <CAB=+i9RVEvEBJVYz-MkMAtZHhsNbr4a88CCVmjkpQ4WevWWxkQ@mail.gmail.com>
2021-05-03 15:15 ` loïc tourlonias
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.