From: Eric Curtin <ericcurtin17@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Jonathan Corbet <corbet@lwn.net>,
Alexander Viro <viro@zeniv.linux.org.uk>,
"Alexander A. Klimov" <grandmaster@al2klimov.de>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:FILESYSTEMS (VFS and infrastructure)"
<linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] Increase limit of max_user_watches from 1/25 to 1/16
Date: Wed, 20 Jan 2021 13:39:36 +0000 [thread overview]
Message-ID: <CANpvso7mbc9C=xjxLDivb6Qm8_FDu2fLjA-StMw4Z-209PHLqw@mail.gmail.com> (raw)
In-Reply-To: <20210120130233.15932-1-ericcurtin17@gmail.com>
On Wed, 20 Jan 2021 at 13:02, Eric Curtin <ericcurtin17@gmail.com> wrote:
>
> The current default value for max_user_watches is the 1/16 (6.25%) of
> the available low memory, divided for the "watch" cost in bytes.
>
> Tools like inotify-tools and visual studio code, seem to hit these
> limits a little to easy.
>
> Also amending the documentation, it referred to an old value for this.
>
> Signed-off-by: Eric Curtin <ericcurtin17@gmail.com>
> ---
> Documentation/admin-guide/sysctl/fs.rst | 4 ++--
> fs/eventpoll.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/admin-guide/sysctl/fs.rst b/Documentation/admin-guide/sysctl/fs.rst
> index f48277a0a850..f7fe45e69c41 100644
> --- a/Documentation/admin-guide/sysctl/fs.rst
> +++ b/Documentation/admin-guide/sysctl/fs.rst
> @@ -380,5 +380,5 @@ This configuration option sets the maximum number of "watches" that are
> allowed for each user.
> Each "watch" costs roughly 90 bytes on a 32bit kernel, and roughly 160 bytes
> on a 64bit one.
> -The current default value for max_user_watches is the 1/32 of the available
> -low memory, divided for the "watch" cost in bytes.
> +The current default value for max_user_watches is the 1/16 (6.25%) of the
> +available low memory, divided for the "watch" cost in bytes.
> diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> index a829af074eb5..de9ef8f6d0b2 100644
> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -2352,9 +2352,9 @@ static int __init eventpoll_init(void)
>
> si_meminfo(&si);
> /*
> - * Allows top 4% of lomem to be allocated for epoll watches (per user).
> + * Allows top 6.25% of lomem to be allocated for epoll watches (per user).
> */
> - max_user_watches = (((si.totalram - si.totalhigh) / 25) << PAGE_SHIFT) /
> + max_user_watches = (((si.totalram - si.totalhigh) / 16) << PAGE_SHIFT) /
> EP_ITEM_COST;
> BUG_ON(max_user_watches < 0);
>
> --
> 2.25.1
>
Please ignore this, this is the wrong limit (an epoll one), I sent
another patch just
to update the documentation to be correct. Weiman Long already kindly solved the
issue in 92890123749bafc317bbfacbe0a62ce08d78efb7
Separate patch is titled "[PATCH] Update
Documentation/admin-guide/sysctl/fs.rst"
prev parent reply other threads:[~2021-01-20 14:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 13:02 [PATCH] Increase limit of max_user_watches from 1/25 to 1/16 Eric Curtin
2021-01-20 13:39 ` Eric Curtin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANpvso7mbc9C=xjxLDivb6Qm8_FDu2fLjA-StMw4Z-209PHLqw@mail.gmail.com' \
--to=ericcurtin17@gmail.com \
--cc=corbet@lwn.net \
--cc=grandmaster@al2klimov.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).