Re: [patch 01/21] Increase default MLOCK_LIMIT to 8 MiB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux