Enable Clustering for TSS device Linux does clustering only for drivers compiled into the kernel and not for loadable modules. TSS relies on clustering to gain performance, otherwise all the stripe I/Os will be partial ones. So we need to enable clustering for the TSS driver in make_request() code.
Limiting the number of requests For each request structure that gets queued to the TSS device queue, there will be requests queued in the underlying device queue. So if all the request slots are consumed by the TSS device, it will lead to deadlock, as processing these requests require a free request structure . To avoid such deadlock, the number of request structures that can be captured by the TSS device is set to half of the total possible request structures in the system.
Removal of Plugging Plugging of the device queue is done in Linux to allow for the accumulation of the requests in the queue. For a pseudo device this accumulation doesn't make sense as this will be done again at the underlying device level. Thus ll_rw_block() code needs to be changed to bypass plugging for the TSS device.