Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Fri 24-02-17 17:40:25, Vitaly Kuznetsov wrote: >> Michal Hocko writes: >> >> > On Fri 24-02-17 17:09:13, Vitaly Kuznetsov wrote: > [...] >> >> While this will most probably work for me I still disagree with the >> >> concept of

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Michal Hocko
On Fri 24-02-17 17:40:25, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Fri 24-02-17 17:09:13, Vitaly Kuznetsov wrote: [...] > >> While this will most probably work for me I still disagree with the > >> concept of 'one size fits all' here and the default 'false' for

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Fri 24-02-17 17:09:13, Vitaly Kuznetsov wrote: >> I have a smal guest and I want to add more memory to it and the >> result is ... OOM. Not something I expected. > > Which is not all that unexpected if you use a technology which has to > allocated

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Michal Hocko
On Fri 24-02-17 17:09:13, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Fri 24-02-17 16:05:18, Vitaly Kuznetsov wrote: > >> Michal Hocko writes: > >> > >> > On Fri 24-02-17 15:10:29, Vitaly Kuznetsov wrote: > > [...] > >> >> Just did a quick (and

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Fri 24-02-17 16:05:18, Vitaly Kuznetsov wrote: >> Michal Hocko writes: >> >> > On Fri 24-02-17 15:10:29, Vitaly Kuznetsov wrote: > [...] >> >> Just did a quick (and probably dirty) test, increasing guest memory from >> >> 4G to 8G

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Michal Hocko
On Fri 24-02-17 16:05:18, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Fri 24-02-17 15:10:29, Vitaly Kuznetsov wrote: [...] > >> Just did a quick (and probably dirty) test, increasing guest memory from > >> 4G to 8G (32 x 128mb blocks) require 68Mb of memory, so

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Fri 24-02-17 15:10:29, Vitaly Kuznetsov wrote: >> Michal Hocko writes: >> >> > On Thu 23-02-17 19:14:27, Vitaly Kuznetsov wrote: > [...] >> >> Virtual guests under stress were getting into OOM easily and the OOM >> >> killer was

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Michal Hocko
On Fri 24-02-17 15:10:29, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Thu 23-02-17 19:14:27, Vitaly Kuznetsov wrote: [...] > >> Virtual guests under stress were getting into OOM easily and the OOM > >> killer was even killing the udev process trying to online the >

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Thu 23-02-17 19:14:27, Vitaly Kuznetsov wrote: >> Michal Hocko writes: >> >> > On Thu 23-02-17 17:36:38, Vitaly Kuznetsov wrote: >> >> Michal Hocko writes: >> > [...] >> >> > Is a grow from 256M -> 128GB really

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-24 Thread Michal Hocko
On Thu 23-02-17 19:14:27, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Thu 23-02-17 17:36:38, Vitaly Kuznetsov wrote: > >> Michal Hocko writes: > > [...] > >> > Is a grow from 256M -> 128GB really something that happens in real life? > >> > Don't

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-23 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Thu 23-02-17 17:36:38, Vitaly Kuznetsov wrote: >> Michal Hocko writes: > [...] >> > Is a grow from 256M -> 128GB really something that happens in real life? >> > Don't get me wrong but to me this sounds quite exaggerated. Hotmem

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-23 Thread Michal Hocko
On Thu 23-02-17 17:36:38, Vitaly Kuznetsov wrote: > Michal Hocko writes: [...] > > Is a grow from 256M -> 128GB really something that happens in real life? > > Don't get me wrong but to me this sounds quite exaggerated. Hotmem add > > which is an operation which has to allocate

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-23 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Thu 23-02-17 16:49:06, Vitaly Kuznetsov wrote: >> Michal Hocko writes: >> >> > On Thu 23-02-17 14:31:24, Vitaly Kuznetsov wrote: >> >> Michal Hocko writes: >> >> >> >> > On Wed 22-02-17 10:32:34, Vitaly

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-23 Thread Michal Hocko
On Thu 23-02-17 16:49:06, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Thu 23-02-17 14:31:24, Vitaly Kuznetsov wrote: > >> Michal Hocko writes: > >> > >> > On Wed 22-02-17 10:32:34, Vitaly Kuznetsov wrote: > >> > [...] > >> >> > There is a

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-23 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Thu 23-02-17 14:31:24, Vitaly Kuznetsov wrote: >> Michal Hocko writes: >> >> > On Wed 22-02-17 10:32:34, Vitaly Kuznetsov wrote: >> > [...] >> >> > There is a workaround in that a user could online the memory or have >> >> > a

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-23 Thread Michal Hocko
On Thu 23-02-17 14:31:24, Vitaly Kuznetsov wrote: > Michal Hocko writes: > > > On Wed 22-02-17 10:32:34, Vitaly Kuznetsov wrote: > > [...] > >> > There is a workaround in that a user could online the memory or have > >> > a udev rule to online the memory by using the sysfs

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-23 Thread Vitaly Kuznetsov
Michal Hocko writes: > On Wed 22-02-17 10:32:34, Vitaly Kuznetsov wrote: > [...] >> > There is a workaround in that a user could online the memory or have >> > a udev rule to online the memory by using the sysfs interface. The >> > sysfs interface to online memory goes through

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-23 Thread Michal Hocko
On Wed 22-02-17 10:32:34, Vitaly Kuznetsov wrote: [...] > > There is a workaround in that a user could online the memory or have > > a udev rule to online the memory by using the sysfs interface. The > > sysfs interface to online memory goes through device_online() which > > should updated the

Re: [RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-22 Thread Vitaly Kuznetsov
Hi, s,memhp_auto_offline,memhp_auto_online, in the subject please :-) Nathan Fontenot writes: > Commit 31bc3858e "add automatic onlining policy for the newly added memory" > provides the capability to have added memory automatically onlined > during add, but this

[RFC PATCH] memory-hotplug: Use dev_online for memhp_auto_offline

2017-02-21 Thread Nathan Fontenot
Commit 31bc3858e "add automatic onlining policy for the newly added memory" provides the capability to have added memory automatically onlined during add, but this appears to be slightly broken. The current implementation uses walk_memory_range() to call online_memory_block, which uses