linux/include
Aneesh Kumar K.V bae8495381 mm/pmem: avoid inserting hugepage PTE entry with fsdax if hugepage support is disabled
Differentiate between hardware not supporting hugepages and user disabling
THP via 'echo never > /sys/kernel/mm/transparent_hugepage/enabled'

For the devdax namespace, the kernel handles the above via the
supported_alignment attribute and failing to initialize the namespace if
the namespace align value is not supported on the platform.

For the fsdax namespace, the kernel will continue to initialize the
namespace.  This can result in the kernel creating a huge pte entry even
though the hardware don't support the same.

We do want hugepage support with pmem even if the end-user disabled THP
via sysfs file (/sys/kernel/mm/transparent_hugepage/enabled).  Hence
differentiate between hardware/firmware lacking support vs user-controlled
disable of THP and prevent a huge fault if the hardware lacks hugepage
support.

Link: https://lkml.kernel.org/r/20210205023956.417587-1-aneesh.kumar@linux.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-02-24 13:38:32 -08:00
..
acpi IOMMU Updates for Linux v5.12 2021-02-22 10:31:29 -08:00
asm-generic Modules updates for v5.12 2021-02-23 10:15:33 -08:00
clocksource
crypto Keyrings miscellany 2021-02-23 16:09:23 -08:00
drm
dt-bindings Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2021-02-23 14:56:23 -08:00
keys
kunit
kvm
linux mm/pmem: avoid inserting hugepage PTE entry with fsdax if hugepage support is disabled 2021-02-24 13:38:32 -08:00
math-emu
media Fixes around VM_FPNMAP and follow_pfn 2021-02-22 17:45:02 -08:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2021-02-17 13:19:24 -08:00
pcmcia
ras
rdma RDMA/ipoib: Remove racy Subnet Manager sendonly join checks 2021-02-16 14:42:58 -04:00
scsi
soc IOMMU Updates for Linux v5.12 2021-02-22 10:31:29 -08:00
sound ASoC: Updates for v5.12 2021-02-17 21:16:27 +01:00
target
trace mm, tracing: record slab name for kmem_cache_free() 2021-02-24 13:38:26 -08:00
uapi Changes in gfs2: 2021-02-23 14:04:04 -08:00
vdso
video
xen x86: 2021-02-21 13:31:43 -08:00