Re: need SUNRPC TCP to receive into aligned pages [was: Re: [PATCH 1/6] NFSD: add the ability to enable use of RWF_DONTCACHE for all IO]

Christoph Hellwig
2025-06-17T04:37:02Z

On Mon, Jun 16, 2025 at 12:07:42PM -0400, Mike Snitzer wrote:
> But that's OK... my test bdev is a bad example (archaic VMware vSphere
> provided SCSI device): it doesn't reflect expected modern hardware.
>
> But I just slapped together a test pmem blockdevice (memory backed,
> using memmap=6G!18G) and it too has dma_alignment=511

That's the block layer default when not overriden by the driver, I guess
pmem folks didn't are enough. I suspect it should not have any
alignment requirements at all.

> I'd like NFSD to be able to know if its bvec is dma-aligned, before
> issuing DIO writes to underlying XFS. AFAIK I can do that simply by
> checking the STATX_DIOALIGN provided dio_mem_align...

Exactly.