[openib-general] What context can CM be called from?
Libor Michalek
libor at topspin.com
Tue Mar 29 15:38:26 PST 2005
On Tue, Mar 29, 2005 at 09:29:35AM -0800, Sean Hefty wrote:
> Roland Dreier wrote:
> > Tziporet> Hi, If I remember correctly the verbs of create &
> > Tziporet> destroy AVs should be enabled from interrupt context too
> > Tziporet> since they are not privileged verbs. In VAPI we
> > Tziporet> implemented these verbs in this way and I think it is
> > Tziporet> important to keep it this way.
> >
> > Yes, you're correct that the AV verbs are not privileged according to
> > the table in chapter 11 of the IB spec. I'm not sure that this
> > requires that they must be available from interrupt context but it is
> > reasonable for us to choose the policy that all non-privileged verbs
> > may be called from interrupt context.
> >
> > Fixing mthca to allow the AH verbs to be callable from interrupt
> > context is easy -- the trivial patch is included below.
> >
> > I'm not sure if this removes all obstructions to the CM being usable
> > from interrupt context.
>
> With this patch, changing the kmalloc in cm_alloc_msg() to use
> GFP_ATOMIC rather than GFP_KERNEL should allow the CM to be usable from
> interrupt context. Of course, I haven't actually tested this...
>
> I have no objection to this change however.
I could go either way on this issue myself. If the call can only be
made from thread context I will use schedule_work() to execute the
request to send the dreq. However, I would imagine that other CM users
would want to send requests in interrupt context...
-Libor
More information about the general
mailing list