summaryrefslogtreecommitdiffstats
path: root/drivers/block/mtip32xx/mtip32xx.h
diff options
context:
space:
mode:
authorSam Bradshaw <sbradshaw@micron.com>2014-01-15 10:14:57 -0800
committerJens Axboe <axboe@kernel.dk>2014-01-21 20:20:13 -0800
commit188b9f49d4b156b0c07ee05bf90ab7b290077d0f (patch)
treef23d19d17db74f75a5099bbbef6cc75d315a80b3 /drivers/block/mtip32xx/mtip32xx.h
parente1803a706fbb65687657db351ff91e5c4c147125 (diff)
downloadblackbird-op-linux-188b9f49d4b156b0c07ee05bf90ab7b290077d0f.tar.gz
blackbird-op-linux-188b9f49d4b156b0c07ee05bf90ab7b290077d0f.zip
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>
Diffstat (limited to 'drivers/block/mtip32xx/mtip32xx.h')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.h b/drivers/block/mtip32xx/mtip32xx.h
index 9be7a1582ad3..bda35d97246a 100644
--- a/drivers/block/mtip32xx/mtip32xx.h
+++ b/drivers/block/mtip32xx/mtip32xx.h
@@ -69,7 +69,7 @@
* Maximum number of scatter gather entries
* a single command may have.
*/
-#define MTIP_MAX_SG 128
+#define MTIP_MAX_SG 504
/*
* Maximum number of slot groups (Command Issue & s_active registers)
@@ -391,15 +391,13 @@ struct mtip_port {
*/
dma_addr_t rxfis_dma;
/*
- * Pointer to the beginning of the command table memory as used
- * by the driver.
+ * Pointer to the DMA region for RX Fis, Identify, RLE10, and SMART
*/
- void *command_table;
+ void *block1;
/*
- * Pointer to the beginning of the command table memory as used
- * by the DMA.
+ * DMA address of region for RX Fis, Identify, RLE10, and SMART
*/
- dma_addr_t command_tbl_dma;
+ dma_addr_t block1_dma;
/*
* Pointer to the beginning of the identify data memory as used
* by the driver.
OpenPOWER on IntegriCloud