omap_hsmmc: Reduce max_segs for reliability
Subsystems (2)
PATCH v2 1/1 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.
--- drivers/mmc/host/omap_hsmmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Changes in v2:
- More verbose commit message
- Rebased onto current master
drivers/mmc/host/omap_hsmmc.c +3 -3
@@ -2097,9 +2097,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev) host->dbclk =NULL ; } -/* Since we do only SG emulation, we can have as many segs -* as we want. */ - mmc->max_segs =1024 ; +/* Set this to a value that allows allocating an entire descriptor +* list within a page (zero order allocation). */ + mmc->max_segs =64 ; mmc->max_blk_size =512 ;/* Block Length at max can be 1024 */ mmc->max_blk_count =0xFFFF ;/* No. of Blocks is 16 bits */
Signature · 1 line
2.9.4
Quoted 7 lines · Will Newton
Reduce
max_segsto 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 orderGFP_ATOMICallocation inedma_prep_slave_sgwhen setting up a transfer which can potentially fail due to fragmentation under heavy I/O load.
Quoted 5 lines
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.
Thanks for updating the description, makes sense to me. Sounds like we may want to set the size different for ADMA later on if needed and there's nothing preventing that, so:
Quoted 30 lines
Signed-off-by Will Newton <[email protected]>--- drivers/mmc/host/omap_hsmmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Changes in v2:
- More verbose commit message
- Rebased onto current masterdrivers/mmc/host/omap_hsmmc.c +3
-3@@ -2097,9 +2097,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev) host->dbclk =NULL ; } -/* Since we do only SG emulation, we can have as many segs -* as we want. */ - mmc->max_segs =1024 ; +/* Set this to a value that allows allocating an entire descriptor +* list within a page (zero order allocation). */ + mmc->max_segs =64 ; mmc->max_blk_size =512 ;/* Block Length at max can be 1024 */ mmc->max_blk_count =0xFFFF ;/* No. of Blocks is 16 bits */ Signature · 1 line
2.9.4
Quoted 14 lines · Tony Lindgren
Quoted 7 lines · Will Newton
Reduce
max_segsto 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 orderGFP_ATOMICallocation inedma_prep_slave_sgwhen setting up a transfer which can potentially fail due to fragmentation under heavy I/O load.Quoted 5 lines
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.
Quoted 5 lines
Thanks for updating the description, makes sense to me. Sounds like we may want to set the size different for ADMA later on if needed and there's nothing preventing that, so:
Acked-by Tony Lindgren <[email protected]>
Ping? Does this one look OK?
Quoted 30 lines
Quoted 30 lines
Signed-off-by Will Newton <[email protected]>--- drivers/mmc/host/omap_hsmmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Changes in v2:
- More verbose commit message
- Rebased onto current masterdrivers/mmc/host/omap_hsmmc.c +3
-4@@ -2097,9 +2097,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev) host->dbclk =NULL ; } -/* Since we do only SG emulation, we can have as many segs -* as we want. */ - mmc->max_segs =1024 ; +/* Set this to a value that allows allocating an entire descriptor +* list within a page (zero order allocation). */ + mmc->max_segs =64 ; mmc->max_blk_size =512 ;/* Block Length at max can be 1024 */ mmc->max_blk_count =0xFFFF ;/* No. of Blocks is 16 bits */ --2.9.4
Ulf Hansson
AppliedQuoted 7 lines · Will Newton
Reduce
max_segsto 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 orderGFP_ATOMICallocation inedma_prep_slave_sgwhen setting up a transfer which can potentially fail due to fragmentation under heavy I/O load.
Quoted 7 lines
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 Will Newton <[email protected]>
Thanks, applied for next!
Kind regards
Uffe
Quoted 32 lines
--- drivers/mmc/host/omap_hsmmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Changes in v2:
- More verbose commit message
- Rebased onto current masterdrivers/mmc/host/omap_hsmmc.c +3
-4@@ -2097,9 +2097,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev) host->dbclk =NULL ; } -/* Since we do only SG emulation, we can have as many segs -* as we want. */ - mmc->max_segs =1024 ; +/* Set this to a value that allows allocating an entire descriptor +* list within a page (zero order allocation). */ + mmc->max_segs =64 ; mmc->max_blk_size =512 ;/* Block Length at max can be 1024 */ mmc->max_blk_count =0xFFFF ;/* No. of Blocks is 16 bits */ --2.9.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html