--- zzzz-none-000/linux-4.4.60/include/linux/mm_types.h 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/include/linux/mm_types.h 2021-02-04 17:41:59.000000000 +0000 @@ -238,8 +238,14 @@ __u16 size; #endif }; - +#if defined(CONFIG_ATH79) +/** + * JZ-83527: 1750E: prevent OOM's by using page-alloc order 1 for netdev_alloc + */ +#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 +374,14 @@ struct completion startup; }; +#define AVM_ENH_SWAP_STATS 1 + enum { MM_FILEPAGES, MM_ANONPAGES, MM_SWAPENTS, + MM_SWAPOUTS, + MM_SWAPINS, NR_MM_COUNTERS }; @@ -392,7 +402,7 @@ struct mm_struct { struct vm_area_struct *mmap; /* list of VMAs */ struct rb_root mm_rb; - u32 vmacache_seqnum; /* per-thread vmacache */ + u64 vmacache_seqnum; /* per-thread vmacache */ #ifdef CONFIG_MMU unsigned long (*get_unmapped_area) (struct file *filp, unsigned long addr, unsigned long len,