Commit 94424004 authored by Will Newton's avatar Will Newton Committed by Ulf Hansson

mmc: omap_hsmmc: Reduce max_segs for reliability

Reduce max_segs to 64, a value that allows allocation of an entire
EDMA descriptor list within a single page - EDMA descriptors
are 40 bytes and the header is much larger. This avoids doing a
higher order GFP_ATOMIC allocation in edma_prep_slave_sg
when setting up a transfer which can potentially fail due to
fragmentation under heavy I/O load.

The current value of 1024 is unusually high in comparison to
other mmc host drivers which mostly use values of between 1
and 256. The EDMA driver at present splits lists above 20
segments in any case so reducing the size of lists we pass to
it shouldn't add much overhead.
Signed-off-by: default avatarWill Newton <willn@resin.io>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 16367184
...@@ -2076,9 +2076,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev) ...@@ -2076,9 +2076,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
host->dbclk = NULL; host->dbclk = NULL;
} }
/* Since we do only SG emulation, we can have as many segs /* Set this to a value that allows allocating an entire descriptor
* as we want. */ * list within a page (zero order allocation). */
mmc->max_segs = 1024; mmc->max_segs = 64;
mmc->max_blk_size = 512; /* Block Length at max can be 1024 */ mmc->max_blk_size = 512; /* Block Length at max can be 1024 */
mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */ mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment