Skip to content
Snippets Groups Projects
Commit b7175e24 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: add a dma mapping iterator


blk_rq_map_sg is maze of nested loops.  Untangle it by creating an
iterator that returns [paddr,len] tuples for DMA mapping, and then
implement the DMA logic on top of this.  This not only removes code
at the source level, but also generates nicer binary code:

$ size block/blk-merge.o.*
   text	   data	    bss	    dec	    hex	filename
  10001	    432	      0	  10433	   28c1	block/blk-merge.o.new
  10317	    468	      0	  10785	   2a21	block/blk-merge.o.old

Last but not least it will be used as a building block for a new
DMA mapping helper that doesn't rely on struct scatterlist.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250106081609.798289-1-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2caca8fc
No related branches found
No related tags found
Loading
Loading
  • CI @project_6562_bot_3b694df01c2c1ffadb3454960c315475

    mentioned in commit dd8b0582

    ·

    mentioned in commit dd8b0582

    Toggle commit list
  • CI @project_6562_bot_3b694df01c2c1ffadb3454960c315475

    mentioned in commit 889c5706

    ·

    mentioned in commit 889c5706

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment