Re: scsi command slab allocation under memory pressure

James Bottomley
2003-02-03T23:05:20Z

On Mon, 2003-02-03 at 17:55, Doug Ledford wrote:
> I think the case is that there is no problem to be solved. One command
> per host is enough to keep each host running, and that's enough to keep
> the system running. If we are ever low enough on mem that we get down to
> failing scsi command allocations, the system is already hurting. The
> complaint was that a device doing something other than swap could starve a
> swap device. I don't buy that. If the device is doing constant reads
> then it's going to run out of mem eventually and block just like our
> allocations are, if it's writing then it very likely is freeing up just as
> many pages as the swap operation would be. In short, I think if we keep
> the disk subsystem running, even if crippled with just one command, the
> problem becomes self correcting and there isn't much for us to solve. Of
> course, that's just my 5 minute analysis, someone feel free to prove me
> wrong.

I agree with the analysis: The system can make forward progress as long
as we have only one guaranteed command.

However, I do worry about the performance under memory pressure. I
don't think only having one command pre allocated per HBA is sufficient
to ensure efficient swap out behaviour under load. The question, of
course, is what do we need to do to make it more efficient?

Andrew, these patches are now in Linus' BK, so if you want to take a
look and see how our loaded behaviour is, I'd be grateful.

James