INTR_FILTER?

Andriy Gapon avg at icyb.net.ua
Thu Jan 29 09:51:21 PST 2009


on 29/01/2009 19:17 Rui Paulo said the following:
> 
> On 29 Jan 2009, at 11:47, Andriy Gapon wrote:
> 
>> INTR_FILTER - what does it do?
>> It doesn't seem to be documented anywhere, but seems to affect interrupt
>> code.
> 
> INTR_FILTER allows you to skip the FILTER+ITHREAD headache.

Could you please explain a little bit what is this headache?
I thought, similarly to what Ed said, that in filter one could quickly
check for a stray interrupt (or shared interrupt from other device) and
in ithread one could perform meaningful work.
But I also had some doubts about what is legal and what is illegal in
ithread. E.g. could I take a non-spin mutex or wait on a condvar? I
guess not - because in the case of shared interrupts the same ithread is
used to handle everything.

> See dev/asmc/asmc.c for an example.

Thank you, the example is enlightening. But also one has to look into
how "the framework" works (or just know it) to understand why things are
done this way but not the other. E.g. why you have to use a taskqueue in
non-INTR_FILTER case.

BTW, INTR_FILTER seems quite useful. Why, then, it is not the default?


-- 
Andriy Gapon


More information about the freebsd-hackers mailing list