Re: [PATCH + RFC] Beginning of some updates to scsi mid layer

Pete Zaitcev
2002-06-19T17:44:36Z

> So, when Justin Gibbs' driver allocates a queue depth of 253
> commands on drive X, then finds out that drive X has a hard limit of 64,
> then we aren't continuing to waste 189 commands worth of allocated kernel
> memory that can never be effectively used.

> + diff = p->dev_lun_queue_depth[tindex] -
> + p->dev_active_cmds[tindex];
> + p->dev_lun_queue_depth[tindex] -= diff;

I think this is not enough, or backwards. We hit a situation with
EMC when attaching hundreds of disks depleted atomic memory with
queue request arrays before swapper had a chance to replenish it.
I would much appreciate if the initial allocation was concervative,
if low performing, and was adjusted upwards at slave_attach time.

For 2.5 I would appreciate if we made some SCSI allocations non-atomic.
The probe time things better be GFP_KERNEL.

-- Pete