Re: [PATCH v2] DAX: warn when kmem regions are truncated for memory block alignment.
From: Alison Schofield
Date: Wed Apr 09 2025 - 18:22:42 EST
On Tue, Apr 01, 2025 at 09:59:20PM -0400, Gregory Price wrote:
> Device capacity intended for use as system ram should be aligned to the
> archite-defined memory block size or that capacity will be silently
> truncated and capacity stranded.
>
> As hotplug dax memory becomes more prevelant, the memory block size
> alignment becomes more important for platform and device vendors to
> pay attention to - so this truncation should not be silent.
>
> This issue is particularly relevant for CXL Dynamic Capacity devices,
> whose capacity may arrive in spec-aligned but block-misaligned chunks.
>
> Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
> Suggested-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> Signed-off-by: Gregory Price <gourry@xxxxxxxxxx>
Existing unit test 'daxctl-devices.sh' hits this case:
[ 52.547521] kmem dax3.0: DAX region truncated by 62.0 MiB due to alignment
Tested-by: Alison Schofield <alison.schofield@xxxxxxxxx>
snip
>