]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
DAX: warn when kmem regions are truncated for memory block alignment
authorGregory Price <gourry@gourry.net>
Thu, 10 Apr 2025 14:28:31 +0000 (10:28 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 13 May 2025 06:50:49 +0000 (23:50 -0700)
commit3592a86a2b6be115000b82af78fe7f96fbc658a4
tree97fa147e37b0fa740fc1e28213e358460146fdf3
parent69eadd6a05409ca3725cabf8d60ccf6c8f87e193
DAX: warn when kmem regions are truncated for memory block alignment

Device capacity intended for use as system ram should be aligned to the
architecture-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.

Link: https://lkml.kernel.org/r/20250410142831.217887-1-gourry@gourry.net
Suggested-by: David Hildenbrand <david@redhat.com>
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Gregory Price <gourry@gourry.net>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/dax/kmem.c