blk-mq: scale depth and rq map appropriate if low on memory
authorJens Axboe <axboe@fb.com>
Wed, 10 Sep 2014 15:02:03 +0000 (09:02 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:54 +0000 (12:54 -0600)
commit9a7b7a81d5aea2dca5d0181d4e0fa17c73d10722
tree12c70c3e21f3e38afb5c3c2e2bb56b691ca80f71
parent9b93bf28f8ac2838dbd8925f8b4bb0289cff5263
blk-mq: scale depth and rq map appropriate if low on memory

If we are running in a kdump environment, resources are scarce.
For some SCSI setups with a huge set of shared tags, we run out
of memory allocating what the drivers is asking for. So implement
a scale back logic to reduce the tag depth for those cases, allowing
the driver to successfully load.

We should extend this to detect low memory situations, and implement
a sane fallback for those (1 queue, 64 tags, or something like that).

Tested-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c