diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-04-06 00:58:01 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-04-06 00:58:01 +0000 |
commit | 84cd084901fdee8a8e3fae3a885b533c9a29b1d5 (patch) | |
tree | b95204b31eb1a1af9f736150e4cd9386b87b48e0 /kerberosV | |
parent | 79fb0239fb794c3a4a1eb6f7145f92d0a923b81c (diff) |
implement a new mechanism for allocating resources on the bus.
instead of optimistically trying to use a resource by executing an
xs and then failing when there's no room for it, this puts things
that want to use the hardware on a runqueue. as resources become
available on the bus then consumers on the runqueue are popped off
and guaranteed access to the resource.
the resources are generally "ccbs" in adapter drivers, so this
abstracts a way for the midlayer to get access to them into something
called iopools.
it also provides a callback api for consumers of resources to use:
the scsi_ioh api for things that want direct access to the ccbs,
and the scsi_xsh api for things that want to issue a scsi_xfer on
the bus. these apis have been modelled on the timeout api.
scsi_xs_get and therefore scsi_scs_cmd have been cut over to using these
apis internally, so if they are allowed to sleep then can wait on the
runqueue for a resource to become available and therefore guarantee that
when executed on an adapter providing an iopool that they will succeed.
ok krw@ beck@ marco@
tested by many including krw@ beck@ mk@ okan@ todd@
Diffstat (limited to 'kerberosV')
0 files changed, 0 insertions, 0 deletions