Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[sfrench/cifs-2.6.git] / init / Kconfig
index 82b84e5ee30d5387c8ff0d6a03caf1bb054e651c..8b9ffe236e4fea14355d65b92bb7ffd9b3ffc40d 100644 (file)
@@ -1752,6 +1752,30 @@ config SLAB_FREELIST_HARDENED
          sacrifies to harden the kernel slab allocator against common
          freelist exploit methods.
 
+config SHUFFLE_PAGE_ALLOCATOR
+       bool "Page allocator randomization"
+       default SLAB_FREELIST_RANDOM && ACPI_NUMA
+       help
+         Randomization of the page allocator improves the average
+         utilization of a direct-mapped memory-side-cache. See section
+         5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
+         6.2a specification for an example of how a platform advertises
+         the presence of a memory-side-cache. There are also incidental
+         security benefits as it reduces the predictability of page
+         allocations to compliment SLAB_FREELIST_RANDOM, but the
+         default granularity of shuffling on the "MAX_ORDER - 1" i.e,
+         10th order of pages is selected based on cache utilization
+         benefits on x86.
+
+         While the randomization improves cache utilization it may
+         negatively impact workloads on platforms without a cache. For
+         this reason, by default, the randomization is enabled only
+         after runtime detection of a direct-mapped memory-side-cache.
+         Otherwise, the randomization may be force enabled with the
+         'page_alloc.shuffle' kernel command line parameter.
+
+         Say Y if unsure.
+
 config SLUB_CPU_PARTIAL
        default y
        depends on SLUB && SMP