]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtip32xx: Make SGL container per-command to eliminate high order dma allocation
authorSam Bradshaw <sbradshaw@micron.com>
Wed, 15 Jan 2014 18:14:57 +0000 (10:14 -0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 22 Jan 2014 04:20:13 +0000 (20:20 -0800)
commit188b9f49d4b156b0c07ee05bf90ab7b290077d0f
treef23d19d17db74f75a5099bbbef6cc75d315a80b3
parente1803a706fbb65687657db351ff91e5c4c147125
mtip32xx: Make SGL container per-command to eliminate high order dma allocation

The mtip32xx driver makes a high order dma memory allocation to store a
command index table, some dedicated buffers, and a command header & SGL
blob.  This allocation can fail with a surprise insert under low &
fragmented memory conditions.

This patch breaks these regions up into separate low order allocations
and increases the maximum number of segments a single command SGL can
have.  We wanted to allow at least 256 segments for 1 MB direct IO.
Since the command header occupies the first 0x80 bytes of the SGL blob,
that meant we needed two 4k pages to contain the header and SGL.  The
two pages allow up to 504 SGL segments.

Signed-off-by: Sam Bradshaw <sbradshaw@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/mtip32xx/mtip32xx.c
drivers/block/mtip32xx/mtip32xx.h