tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RCU (or equivalent) for NetBSD?

On Mar 3, 2013, at 12:43 PM, Dennis Ferguson 
<> wrote:

> On 3 Mar, 2013, at 19:26 , "J. Hannken-Illjes" 
> <> wrote:
>>> The basic functions seem to be a perfect fit.
>>> The only bit I'm confused about is what the implication of
>>>  The read operations may happen from software interrupt at the
>>>  IPL_SOFTCLOCK symbolic level.
>>> is for an application that wants to use this interface.  Processing of 
>>> packets
>>> arriving from hardware interfaces is traditionally run at IPL_SOFTNET, is 
>>> the
>>> above telling me a reader can't use pserialize(9) if it is running at that
>>> level?
>> The opposite: pserialize may be used from soft interrupt context.
> I assume it can also be used in process context, that is in code running as
> a result of a system call (which is the context the other half of packets
> processed through the network stack on a host are handled in).
> If it is the case that pserialize can be used from soft interrupt context
> at any priority level, however, then why does the man page call out 
> in particular?  IPL_SOFTNET is usually a higher priority and in theory can 
> interrupt
> IPL_SOFTCLOCK processing; is that really okay?

Currently it protects at IPL_SOFTSERIAL.  Not a problem at all as
soft interrupts are not preemptive.  Process context is also ok.

Technically pserialize_read_enter / pserialize_read_exit are
implemented as "s = splsoftserial()" / "splx(s)".

J. Hannken-Illjes - - TU Braunschweig 

Home | Main Index | Thread Index | Old Index