Re: md raid0 Direct IO DMA alignment

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

 



On Tue, Jun 17, 2025 at 02:19:11AM +0000, Jason Rahman wrote:
> It seems that rather than setting dma_alignment to SECTOR_SIZE - 1 in
> md_init_stacking_limits, it should be set to zero, and as
> queue_limits_stack_bdev is called on each backing device, the
> dma_alignment value will be updated to the largest dma_alignment value
> among all backing devices. Are there any thoughts/concerns about
> updating the mddev dma_alignment computation to track the underlying
> backing device more closely, without the minimum SECTOR_SIZE - 1 lower
> bound today?

I believe it should be safe to stack dma alignment to the least common
multiple of the block devices you're stacking. blk_stack_limits already
tries to do that, at least.

So I think you're right, it should be okay to not set the dma_alignemnt
limit when initializing the stacking limits. For any block device who
hasn't set their dma_alignemnt limit, it will default to SECTOR_SIZE - 1
later anyway, so I don't think stacking needs to explicitly initialize
it.




[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