An interrupt is what is suggests: it interrupts normal work on the machine; it's a bit of an annoyance that has to be tolerated. Context has to be saved, the handler has to be executed (along with bottom halves, which we will cover in the Understanding and using top and bottom halves section), and then context must be restored to whatever got interrupted. So, you get the idea: it's a critical code path, so don't plod along – be fast and non-blocking!
It also brings up the question, how fast is fast? While the answer is, of course, platform-dependent, a heuristic is this: keep your interrupt processing as fast as is possible, within tens of microseconds. If it consistently exceeds 100 microseconds, then the need for alternate strategies does come up. We'll cover what you can do when this occurs later in the chapter.
With regard to our simple my_interrupt() pseudocode snippet (shown in the Don't block – spotting...