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 'one size fits all' here and the default

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 ACPI, > >> we're tak

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 in order to add more

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 probably dirty) test, increasing guest

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 (32 x 128mb blocks) require 68Mb of me

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 it's roughly 2Mb > >> p

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 even killing the udev process trying to

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

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 something that happens in real life? >> >> > Don't get me

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 get me wrong but to me this sounds qui

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 add >> > which is an operation which has

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 memory has to scale

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 Kuznetsov wrote: >> >> > [...] >> >> >> > There is a workaround

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 workaround in that a user could online the m

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 udev rule to online the memory by using th

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 interface. The > >> > s

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 device_online() whi

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

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 appears to be slightly broken.

[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 memory_bloc