uwcms / IPMC

University of Wisconsin ZYNQ IPMC
8 stars 5 forks source link

RingBuffer read/write performance optimization #23

Open mpv89 opened 5 years ago

mpv89 commented 5 years ago

read() and write() functions of RingBuffer are wrapped around a CriticalGuard, meaning interrupts will be disabled even for large reads and writes, which can cause performance issues.

Consider only guarding the necessary info to do the copy and then execute the copy itself outside the guard, for example. Alternatively, don't guard it and let the drivers handle interrupts locally.