From: Andrew Morton <akpm@linux-foundation.org>
To: Andrew Shewmaker <agshew@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
alan@lxorguk.ukuu.org.uk, simon.jeons@gmail.com,
ric.masonn@gmail.com
Subject: Re: [PATCH v6 1/2] mm: limit growth of 3% hardcoded other user reserve
Date: Wed, 27 Mar 2013 14:28:32 -0700 [thread overview]
Message-ID: <20130327142832.8505be7276064bf4b1daab5c@linux-foundation.org> (raw)
In-Reply-To: <20130318214442.GA1441@localhost.localdomain>
On Mon, 18 Mar 2013 17:44:42 -0400 Andrew Shewmaker <agshew@gmail.com> wrote:
> Add user_reserve_kbytes knob.
>
> Limit the growth of the memory reserved for other user
> processes to min(3% current process size, user_reserve_pages).
>
> user_reserve_pages defaults to min(3% free pages, 128MB)
That was an epic changelog ;)
>
> ...
>
> +int __meminit init_user_reserve(void)
> +{
> + unsigned long free_kbytes;
> +
> + free_kbytes = global_page_state(NR_FREE_PAGES) << (PAGE_SHIFT - 10);
> +
> + sysctl_user_reserve_kbytes = min(free_kbytes / 32, 1UL << 17);
> + return 0;
> +}
> +module_init(init_user_reserve)
Problem is, the initial default values will become wrong if memory if
hot-added or hot-removed.
That could be fixed up by appropriate use of
register_memory_notifier(), but what would the notification handler do
if the operator has modified the value? Proportionally scale it?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-03-27 21:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 21:44 Andrew Shewmaker
2013-03-27 21:28 ` Andrew Morton [this message]
2013-03-28 16:49 ` Andrew Shewmaker
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=20130327142832.8505be7276064bf4b1daab5c@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=agshew@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ric.masonn@gmail.com \
--cc=simon.jeons@gmail.com \
/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