lkml.org 
[lkml]   [2015]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4 v4] kernel/fork.c: memory hotplug updates max_threads
On 02/23, Oleg Nesterov wrote:
>
> 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?

OOPS sorry, missed 2/4 ;)

> 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.

still true, or I am tottaly confused.

Oleg.



\
 
 \ /
  Last update: 2015-02-23 22:01    [W:0.111 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site