public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Jason Rahman <jasonrahman@microsoft.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Adam Prout <adamprout@microsoft.com>,
	Girish Mittur Venkataramanappa <girishmv@microsoft.com>,
	"kbusch@meta.com" <kbusch@meta.com>,
	James Bottomley <james.bottomley@microsoft.com>
Subject: Re: md raid0 Direct IO DMA alignment
Date: Tue, 17 Jun 2025 10:36:49 -0600	[thread overview]
Message-ID: <aFGZofPWrNMT2rbW@kbusch-mbp> (raw)
In-Reply-To: <BL0PR2101MB1313AA35D88E8F547132B505A173A@BL0PR2101MB1313.namprd21.prod.outlook.com>

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.

      parent reply	other threads:[~2025-06-17 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-17  2:19 md raid0 Direct IO DMA alignment Jason Rahman
2025-06-17  3:12 ` Jason Rahman
2025-06-17 16:36 ` Keith Busch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aFGZofPWrNMT2rbW@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=adamprout@microsoft.com \
    --cc=girishmv@microsoft.com \
    --cc=james.bottomley@microsoft.com \
    --cc=jasonrahman@microsoft.com \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox