--- zzzz-none-000/linux-4.4.271/include/linux/mm_types.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/include/linux/mm_types.h 2023-04-19 10:22:30.000000000 +0000 @@ -239,7 +239,16 @@ #endif }; +/* The 1200ax was not designed with enough memory, we need the workaround + * from the 1750e to get it working even on product launch. + * Drop PAGE_FRAG_CACHE from 32768 -> 8192 + */ +#ifdef CONFIG_AVM_OOM_MITIGATION_PAGE_FRAG_CACHE +#define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(8192, ~PAGE_MASK) +#else #define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK) +#endif + #define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE) struct page_frag_cache { @@ -368,10 +377,14 @@ struct completion startup; }; +#define AVM_ENH_SWAP_STATS 1 + enum { MM_FILEPAGES, MM_ANONPAGES, MM_SWAPENTS, + MM_SWAPOUTS, + MM_SWAPINS, NR_MM_COUNTERS };