by mandarax8 · 8mo ago · 0 comments
Actually, as long as you use different ring buffers for interrupt/non-interrupt context, it should be fine to just drop if you encounter a deadlock due to interrupting an already running interrupt handler.
NMIs will not nest, so there is no risk of arbitrary nesting. So, there should be at most three nesting levels: regular, interrupt (I suspect they do not do logging during interrupts so this may not even exist in their use case), non-maskable interrupt.
Off the top of my head I can think of at least 5 unique ways to not drop the sample with your idea of separate ring buffers being one of them.