Re: [PATCH] mm: ppm: add PPM (Page-Plugger Under Memory) to Page Fault and Overcommit elimination

From: David Hildenbrand (Arm)

Date: Mon Oct 26 2026 - 05:44:12 EST


On 10/24/26 12:45, dev12124 wrote:
> Hi mm subsystem,

Hi,

>
> This patch implements the Memory Tatic called PPM, Page-Plugger Under Memory.
> The Main Objective is: Page Faults and Overcommit Elimination.
>
> A few points under additionate:
>
> 1. Allocation Handshake (ppm_kalloc):
> Using the GFP_PLUG_MEMORY mask, the allocator completely bypasses
> passive overcommit verification. It instantly isolates physical frames
> on the RAM, maps the page table entries síncronamente, and forces the
> Present Bit and Writable Bit to 1 before returning the address block
> register to the CPU.
>
> 2. Desallocation Cleanup (ppm_kfree):
> Triggered via the GFP_FREE_T parameter, the release phase executes an
> immediate length truncation to 0. It forces a synchronous TLB
> invalidation (via invlpg execution) and flushes the data out of the L3
> cache lines using clflushopt instructions before moving the hot clean
> pages into a dedicated priority recycling pool.
>
> I additionate a Buffer/Cache with store important objects.

Reading this description I have no idea what this patch does, what it tries to
solve, and why anybody should spend their time to look into it.

> ---
> include/linux/ppm/gfp_types.h | 74 ++++++++++++++++
> include/linux/slab.h | 11 +++
> mm/memory.c | 158 ++++++++++++++++++++++++++++++++++
> 3 files changed, 243 insertions(+)
> create mode 100644 include/linux/ppm/gfp_types.h
>
> diff --git a/include/linux/ppm/gfp_types.h b/include/linux/ppm/gfp_types.h
> new file mode 100644
> index 000000000..741122b2d
> --- /dev/null
> +++ b/include/linux/ppm/gfp_types.h
> @@ -0,0 +1,74 @@
> +/*
> + Memory Tatic: PPM (Page-Plugger Under Memory).
> + This File is for PPM Flags/Macros/Functions/Types.
> + Engineer (brazilian): João Guilherme da Silva Freitas Lima <joanandalima@xxxxxxxxx>
> + */
> +
> +/* Types Include Guards */
> +#ifndef __PPM_TYPES_MEMORY
> +#define __PPM_TYPES_MEMORY
> +
> +typedef unsigned char uint8_t;
> +typedef unsigned short uint16_t;
> +typedef unsigned int uint32_t;
> +typedef unsigned long long uint64_t;
> +typedef uint64_t gfp_t;
> +/* For errors in Allocation */
> +#define __PPM_ALLOC_ERROR -102
> +/* For errors in Desallocation */
> +#define __PPM_FREE_ERROR 0x04
> +/* For success */
> +#define __PPM_SUCCESS 0
> +#endif
> +
> +/* Functions Include Guards */
> +#ifndef __PPM_FUNCTIONS_MEMORY
> +#define __PPM_FUNCTIONS_MEMORY
> +
> +/* Initializer */
> +void __init_ppm_memory();
> +
> +/* Allocator Optimized */
> +int ppm_kalloc(unsigned long address, uint64_t size, gfp_t flags);
> +
> +/* Desallocator Optimized */
> +int ppm_kfree(uint64_t size);
> +
> +#endif
> +
> +/* Flags Include Guards */
> +#ifndef __PPM_FLAGS_MEMORY
> +#define __PPM_FLAGS_MEMORY
> +
> +/* PPM inits/starts in Bit 54 of a
> + 64-bit variable
> + */
> +gfp_t GFP_PLUG_MEMORY = (1ULL << 54);
> +
> +/* For free memory, the Bit 55 is
> + used
> + */
> +gfp_t GFP_FREE_T = (1ULL << 55);
> +
> +#endif
> +
> +/* Macros Include Guards */
> +#ifndef __PPM_MACROS_MEMORY
> +#define __PPM_MACROS_MEMORY
> +
> +/* For Kernel Kernel tests 2 Bits (54 and 55) in
> + 1 Clock Cycle (or in small clocks, example: 5 Clocks),
> + is used a mask using |
> + */
> +gfp_t GFP_MASK = GFP_PLUG_MEMORY | GFP_FREE_T;
> +
> +#endif
> +
> +/*
> + Notes:
> + E-Mail of RFC:
> + [RFC] mm: page-fault: overcommit: PPM (Page-Plugger Under Memory)
> +
> +
> + Assigned-Off-by: João <joanandalima@xxxxxxxxx>

I don't know if I am supposed to laugh or cry ;)

--
Cheers,

David