uwcms / IPMC

University of Wisconsin ZYNQ IPMC
8 stars 5 forks source link

Mitigate driver interrupt clogging #17

Closed mpv89 closed 5 years ago

mpv89 commented 5 years ago

Some drivers might be doing excessive use of disable/enable of global interrupts for critical portions of the code, this can cause considerable slow down if many drivers do this. Consider audit drivers and changing the disable/enable from global interrupts to interrupts only used by said driver.

jtikalsky commented 5 years ago

Be sure to consider where the removal of critical sections requires the addition of mutexes at each stage.

mpv89 commented 5 years ago

Commit 41396e5 extends the InterruptBasedDriver class to support two new methods: enableInterrupts and disableInterrupts. These can be used inside drivers instead of enterCRITICAL / exitCRITICAL and will only enable or disable driver specific interrupts. The PS UART driver is a good example of how this is used.