# Re: \[PATCH\] Increase default MLOCK\_LIMIT to 8 MiB

- From: Andrew Morton \<akpm@linux-foundation.org\>
- Date: 2021-11-18 21:58:52 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2021/11/1579360
- Thread: https://ratatoskr.run/linux-api/2021/10/1556573/t.md

```text
On Wed, 17 Nov 2021 16:17:26 -0700 Jens Axboe [ref] wrote:

> On 11/17/21 3:26 PM, Johannes Weiner wrote:
> >> Link: https://lkml.kernel.org/r/20211028080813.15966-1-sir@cmpwn.com
> >> Signed-off-by: Drew DeVault <redacted>
> >> Acked-by: Jens Axboe <axboe@kernel.dk>
> >> Acked-by: Cyril Hrubis <chrubis@suse.cz>
> >> Cc: Pavel Begunkov <asml.silence@gmail.com>
> >> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > 
> > Acked-by: Johannes Weiner <hannes@cmpxchg.org>
> > 
> > As per above, I think basing it off of RAM size would be better, but
> > this increase is overdue given all the new users beyond mlock(), and
> > 8M is much better than the current value.
> 
> That's basically my reasoning too. Let's just get something going that
> will at least unblock some valid use cases, and not get bogged down with
> aiming for perfection. The latter can happen in parallel, but it should
> not hold it up imho.

Nobody's aiming for perfection.  We're discussing aiming for "better".

What we should have done on day one was to set the default MLOCK_LIMIT
to zero bytes.  Then everyone would have infrastructure to tune it from
userspace and we wouldn't ever have this discussion.
```
