[ofw] ibal library callback model

Fab Tillier ftillier at windows.microsoft.com
Tue Apr 7 11:06:13 PDT 2009


> Can someone explain to me the ibal threading model that it uses for
> callbacks?
>
> Is it creating 1 thread / processor to invoke CM, QP, PnP, etc.
> callbacks?

In the kernel there's a single thread for PnP, and a single thread for object destruction.  I don't remember how the QP and CM callbacks are handled, I think there's a thread pool that's created internally that has one thread per processor core I believe.

For user-mode IBAL, there's a thread pool that handles IOCTL completions for CQ callbacks, CM callbacks, PnP callbacks, etc.  The threading there is controlled per object - you will only have a single callback per CEP, for example, as the CEP manager won't issue the next IOCTL for a CEP until the callback unwinds.  Similarly, there's a single PnP IOCTL outstanding per PnP registration, so a single thread invoking callbacks for PnP events until the callback unwinds.  Multiple PnP registrations should be able to see callbacks in parallel, though.

I'd have to look at the code in more detail to give more precise answers, the above is off the top of my head.  If you can clarify what you're trying to understand that will help me give you more useful answers.

Hope that helps!
-Fab



More information about the ofw mailing list