Re: Supporting segment sizes smaller than the page size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/5/22 10:00, Keith Busch wrote:
If the hardware's DMA segment is smaller than a page, why doesn't the driver
just split a kernel's larger segment into whatever representation the hardware
wants? We do that in nvme, at least.

Hi Keith,

That's an interesting question. Your question made me realize that the bio_map_kern() changes I proposed can be dropped if the code for counting the number of segments is modified to support small segments.

My answer to your question is twofold:
* Splitting segments in a driver is easy to do if that doesn't cause the number of segments limit to be exceeded (queue_limits.max_segments). It is the responsibility of the block layer to split bios that exceed the maximum number of segments into multiple bios - this is something that cannot be done in a block driver. This is why I think that a (small number of) block layer changes are needed. * The blk_rq_map_sg() function really needs to be modified to support segments smaller than the page size.

Thanks,

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux