On Fri, Dec 10, 2021 at 2:46 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > > -#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) > +#define MLOCK_LIMIT ((PAGE_SIZE > 8*1024*1024) ? PAGE_SIZE : 8*1024*1024) I think I'll just make this #define MLOCK_LIMIT (8*1024*1024) because at the point where it's that big, there's no point in comparing it against PAGE_SIZE any more. If some config has that big of a page size, all the rest of the kernel infrastructure would basically be screwed. We do a lot of core kernel allocations in one-page chunks.. Linus