0

Comment of function tasklet_hrtimer_init

Init a tasklet/hrtimer combo for softirq callbacks

There are few routines used in kernel about tasklet_hrtimer_init.

Can tasklet_hrtimer_init be used in the callback function of hardware interrupt?

wxz
  • 2,254
  • 1
  • 10
  • 31
Carlos
  • 1
  • 3
  • Of course not. It starts a tasklet, including setting up mempools and using spinlocks. Why would you do that in an interrupt routine? An interrupt routine should do the minimum needed to service the interrupt. – stark Dec 29 '21 at 15:29
  • Will mempools and spinlocks affect tasklet_hrtimer_init? – Carlos Dec 31 '21 at 03:19
  • Why do you want to do this? I would highly recommend doing the initialization before setting up the IRQ handler. In the IRQ handler routine, you could start or restart an already initialized hrtimer, or try to cancel a started hrtimer. – Ian Abbott Jan 05 '22 at 16:52

0 Answers0