tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Making bpf MPSAFE (was Re: struct ifnet and ifaddr handling ...)
Hi,
I thought I need more experience of pserialize
(and lock primitives) to tackle ifnet work.
So I suspended the work and now I am trying
another easier task, bpf.
http://www.netbsd.org/~ozaki-r/mpsafe-bpf.diff
I add a spin mutex to both struct bpf_d and
bpf_if to protect them. And also a pair of
pserialize and mutex is added to protect
bpf_iflist and its items (bpf_if). There remains
two critical sections where may block/sleep
(See "XXX may block" comment). IIUC, I have to
get rid of them somehow, right?
BTW, I worry about there is no easy way to
know if a function in a critical section
blocks/sleeps or not. So I wrote a patch to
detect that: http://www.netbsd.org/~ozaki-r/debug-pserialize.diff
Is it meaningful?
Thanks,
ozaki-r
Home |
Main Index |
Thread Index |
Old Index