David Kahn wrote:

> one more question. It's not clear to me how
> the irm pool stuff works.
>
> Who actually allocates MSI/X address/data values
> when these pools are used/defined?
>
> Did I miss that part of the design or interface?
>
> -David

The "Design and Implementation" spec has more about
the mechanics of defining interrupt pools, mapping
requests from devices into the pools, and keeping
the pools balanced.  Although in spite of all of its
excruciating detail, I can see how the main point
you are asking isn't explained there in a simple way.

The interrupt pool is just an abstraction to represent
some supply of interrupt vectors in the system.  It
describes how many they are, of what type, and who
supplied them.  And the request structures are an
abstraction of how many interrupts a particular driver
wants and gets from its respective interrupt pool.

By mapping the two types of structures together, IRM
can generically compute a fair number of interrupts
to give to each device from its pool, in a way which
is balancing together the needs of all the requests
in the same pool.  IRM then uses callbacks to tell the
drivers when there is a change in those computations.

During the callbacks, when the drivers then respond
by calling ddi_intr_alloc(9F) or ddi_intr_free(9F),
those functions are implemented by sending INTROPs
to whichever nexus driver owns and manages the actual
vectors represented by the interrupt pool.  And there
are private implementations in those nexus drivers to
implement the actual vector assignments at that level.

--
Scott

Reply via email to