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@fb.com>
Mon, 30 Mar 2015 18:54:51 +0000 (12:54 -0600)
commitb2f5ec63b9b1d7fb8b185e9170d5b01f2f054ec0
tree0c6c6322a32bfc4392b00e5e01c71dbf10b9213b
parent9f1dfe6fe627aaf363269fdf7656bbf8e35a8f6e
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