Re: Questions related to nano_sleep()/hrtimer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manty,

On Tue, Jun 29 2021 at 13:54, manty kuma wrote:
> - What is the clock source for HRTimers and what is the frequency of
> this clock device?

Depends on your hardware.

> - 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?

1ns is the theoretical precision and depending on the frequency of the
clock source (for reading the time) and the frequency of the clock event
device (for arming the next event) the resulting precision might be >
1ns, but all calculations are at the 1ns level.

> - 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

The timer interrupt which ends up in hrtimer_interrupt() is never
threaded.

> wakeup() is called from interrupt context(called by threaded irq)

I seriously doubt that. If at all then the wakeup() happens from
ksoftirqd().

> 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)

Prio 110? FIFO maximum priority for user space is 99.

If you talk about the kernel internal priority view, then 110 is _not_
FIFO.

Thanks,

        tglx



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux