3.10 Elevator Queuing

The purpose of the elevator queues in NWPA is to order the requests for each device in such a way that the total request throughput is increased while assuring that all requests are executed within a reasonable time frame. This is accomplished by a filter internal to NWPA which can bind to all hard disks, CD-ROM devices, magneto-optical disks, and WORM devices, but not to tape devices. This filter also combines requests into scatter-gather requests.

The elevator filter can be enabled or disabled on a per-device basis using the attributeFlags field within the DeviceInfoStruct. When the Elevator_Off_Flag is set, the elevator is disabled. When cleared (default setting except for tape devices) the elevator filter is enabled.

The filter can be adjusted for each HAM by using the elevatorThreshold field in the DeviceInfoStruct. At this point, the requests can be single requests, or scatter-gather requests. The elevator threshold is the number of requests the HAM wants to process at any given time. The default value of this threshold is 2 requests, which allows a request at the device and a request waiting in the queue. The filter will not “elevator” any requests until the HAM has at least its threshold number of requests. After the HAM has the threshold number of requests, the elevator filter then accepts, organizes, and checks requests for scatter-gather possibilities. Whenever the number of requests at the HAM falls below the elevator threshold, the filter sends a set of requests to the HAM. This set can contain as many as 15 requests. The filter then continues to elevator the requests until the number of requests at the HAM again falls below the elevator threshold.

The threshold can be increased to allow more requests at the HAM. This might be necessary in some HAMs to prevent starving the device or adapter. It is important, however, to not set the threshold too high or the filter does not have the opportunity to optimize the request order or look for scatter-gather opportunities. If the HAM or adapter already performs its own elevator queuing, the elevator filter should be turned off. This allows the HAM to receive all requests in the order they are sent.