From: Chris Friesen <chris.friesen@windriver.com>
To: manty kuma <mantykuma@gmail.com>, linux-rt-users@vger.kernel.org
Subject: Re: Questions related to nano_sleep()/hrtimer
Date: Tue, 29 Jun 2021 13:15:33 -0600 [thread overview]
Message-ID: <fab091ad-bdeb-cb03-79d7-2fa2496bc782@windriver.com> (raw)
In-Reply-To: <CAB6A5-C=YsVca4OQJZ=tOg9mjzEjobD9b94Mkvc0Ora_uQ-GCA@mail.gmail.com>
If you look at the Kconfig files, you should see that selecting
CONFIG_HIGH_RES_TIMERS selects TICK_ONESHOT, which means that instead of
programming a regular interrupt timer tick the kernel will simply
program the next required timer interrupt for the next timer that's
going to expire, whenever that happens to be.
I *thought* that there was code to automatically adjust the priority of
the hrtimer thread based on the priority of the process it was
delivering the wakeup to, but maybe I'm mis-remembering.
Chris
On 6/28/2021 10:54 PM, manty kuma wrote:
> I went through the source code for hrtimers and understood at a decent
> level about how they are working. However, I have the following
> questions.
>
> - What is the clock source for HRTimers and what is the frequency of
> this clock device?
> - with timer subsystem CONFIG_HZ can go to a max of 1000 meaning at
> the maximum only 1 ms latency can be reliably established. I
> understand that hrtimers are not using CONFIG_HZ but i am just curious
> as to what their clock source is and how 1 ns precision is achieved?
> - I am using a RT kernel and I see that interrupt handlers are
> executed as threaded-irqs. Is it possible to configure the priority of
> the interrupt handler hrtimer_interrupt()? for a FF process, the
> wakeup() is called from interrupt context(called by threaded irq)
> which is actually having lesser priority than my higher priority
> process. If possible I would like to change the priority of the
> threaded_irq process that handles timer interrupts. I believe this
> way sleep() will not take longer than expected.(I am debugging issues
> where even my FF process with prio 110 sometimes fails to wake up back
> in time)
>
> Thank you in advance!
>
> Regards,
> Manty
>
next prev parent reply other threads:[~2021-06-29 19:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 4:54 Questions related to nano_sleep()/hrtimer manty kuma
2021-06-29 19:15 ` Chris Friesen [this message]
2021-07-08 13:29 ` Thomas Gleixner
2022-05-12 3:39 ` high latency introduced by hrtimer_interrupt yosi yarchi
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=fab091ad-bdeb-cb03-79d7-2fa2496bc782@windriver.com \
--to=chris.friesen@windriver.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=mantykuma@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.