Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8E3CC4332F for ; Thu, 18 Nov 2021 21:58:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF82B600CD for ; Thu, 18 Nov 2021 21:58:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230315AbhKRWBv (ORCPT ); Thu, 18 Nov 2021 17:01:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:49286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbhKRWBt (ORCPT ); Thu, 18 Nov 2021 17:01:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD99661220; Thu, 18 Nov 2021 21:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1637272729; bh=qRyDXwaTe3qUn3q5rUCnxzGRTuX1TapIqNvlx4tcXq8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=xVqkWFkv5mEQQCTHGzAUSOSOOpzbkwrzNTEjZhCij945qEou5kB0ARDQ8HOY50KJs dFf7SMnq735dbLhsJv0UuGx5ni+N28ON008MIQI8nhme70J9p+5Jd4WCwE6i6TESmN TZXV5bsYmQAchyzzs6EI4mNzygJz9Bfs5eWqyRF4= Date: Thu, 18 Nov 2021 13:58:46 -0800 From: Andrew Morton To: Jens Axboe Cc: Johannes Weiner , Ammar Faizi , Drew DeVault , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, io_uring Mailing List , Pavel Begunkov , linux-mm@kvack.org Subject: Re: [PATCH] Increase default MLOCK_LIMIT to 8 MiB Message-Id: <20211118135846.26da93737a70d486e68462bf@linux-foundation.org> In-Reply-To: References: <20211028080813.15966-1-sir@cmpwn.com> <593aea3b-e4a4-65ce-0eda-cb3885ff81cd@gnuweeb.org> <20211115203530.62ff33fdae14927b48ef6e5f@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Nov 2021 16:17:26 -0700 Jens Axboe 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 > >> Acked-by: Jens Axboe > >> Acked-by: Cyril Hrubis > >> Cc: Pavel Begunkov > >> Signed-off-by: Andrew Morton > > > > Acked-by: Johannes Weiner > > > > 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.