Linux kernel IRQ to execute long action

141 Views Asked by At

I am implementing a kernel module to handle power-off event. Our HW setup will emit an IRQ when power cut-off happens, and device can run 200ms more after that. During this time I have to close all rw-opened Fd to avoid file corruption. I am thinking of two options:

  1. Perform closing all Fds from within the interrupt context itself. It will mask all other interrupts and handle the event until device is off. It may cause freezing issue.
  2. Use Softirqs and do closing in the bottom half.

What would be the best way to implement this? thanks all.

0

There are 0 best solutions below