Re: [PATCH 4/4 v4] kernel/fork.c: memory hotplug updates max_threads

2015-02-23 Thread Oleg Nesterov
On 02/23, Heinrich Schuchardt wrote: > > On 23.02.2015 21:54, Oleg Nesterov wrote: > > > >> And it changes the swapper/0's rlimits. This is pointless after we fork > >> /sbin/init. > > So should writing to /proc/sys/max_threads update the limits of all > processes? Why? No, I think it should not

Re: [PATCH 4/4 v4] kernel/fork.c: memory hotplug updates max_threads

2015-02-23 Thread Heinrich Schuchardt
On 23.02.2015 21:54, Oleg Nesterov wrote: > 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) { >>> +

Re: [PATCH 4/4 v4] kernel/fork.c: memory hotplug updates max_threads

2015-02-23 Thread Oleg Nesterov
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: > > + /* > > +

Re: [PATCH 4/4 v4] kernel/fork.c: memory hotplug updates max_threads

2015-02-23 Thread Oleg Nesterov
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 max