[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150223205052.GA26955@redhat.com>
Date: Mon, 23 Feb 2015 21:50:52 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Heinrich Schuchardt <xypron.glpk@....de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Aaron Tomlin <atomlin@...hat.com>,
Andy Lutomirski <luto@...capital.net>,
Davidlohr Bueso <dave@...olabs.net>,
David Rientjes <rientjes@...gle.com>,
"David S. Miller" <davem@...emloft.net>,
Fabian Frederick <fabf@...net.be>,
Guenter Roeck <linux@...ck-us.net>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
Jens Axboe <axboe@...com>, Joe Perches <joe@...ches.com>,
Johannes Weiner <hannes@...xchg.org>,
Kees Cook <keescook@...omium.org>,
Michael Marineau <mike@...ineau.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Prarit Bhargava <prarit@...hat.com>,
Rik van Riel <riel@...hat.com>,
Rusty Russell <rusty@...tcorp.com.au>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vladimir Davydov <vdavydov@...allels.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4 v4] kernel/fork.c: memory hotplug updates
max_threads
On 02/23, Heinrich Schuchardt wrote:
>
> +static int memory_hotplug_callback(struct notifier_block *self,
> + unsigned long action, void *arg)
> +{
> + switch (action) {
> + case MEM_ONLINE:
> + /*
> + * If memory was added, try to maximize the number of allowed
> + * threads.
> + */
> + set_max_threads(UINT_MAX);
> + break;
> + case MEM_OFFLINE:
> + /*
> + * If memory was removed, try to keep current value.
> + */
> + set_max_threads(max_threads);
> + break;
> + }
can't understand... set_max_threads() added by 1/4 ignore its argument.
Why does it need "int max_threads_suggested" then?
And it changes the swapper/0's rlimits. This is pointless after we fork
/sbin/init.
It seems to me these patches need some cleanups. Plus I am not sure the
kernel should update max_threads automatically, we have the "threads-max"
sysctl.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists