Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Laurent Dufour
Le 10/09/2020 à 13:12, Michal Hocko a écrit : On Thu 10-09-20 09:51:39, Laurent Dufour wrote: Le 10/09/2020 à 09:23, Michal Hocko a écrit : On Wed 09-09-20 18:07:15, Laurent Dufour wrote: Le 09/09/2020 à 12:59, Michal Hocko a écrit : On Wed 09-09-20 11:21:58, Laurent Dufour wrote: [...] For

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread David Hildenbrand
On 10.09.20 14:47, Michal Hocko wrote: > On Thu 10-09-20 14:03:48, Oscar Salvador wrote: >> On Thu, Sep 10, 2020 at 01:35:32PM +0200, Laurent Dufour wrote: >> >>> That points has been raised by David, quoting him here: >>> IIRC, ACPI can hotadd memory while SCHEDULING, this patch would break

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Laurent Dufour
Le 10/09/2020 à 14:00, David Hildenbrand a écrit : On 10.09.20 13:35, Laurent Dufour wrote: Le 10/09/2020 à 13:12, Michal Hocko a écrit : On Thu 10-09-20 09:51:39, Laurent Dufour wrote: Le 10/09/2020 à 09:23, Michal Hocko a écrit : On Wed 09-09-20 18:07:15, Laurent Dufour wrote: Le 09/09/202

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread David Hildenbrand
On 10.09.20 14:36, Laurent Dufour wrote: > Le 10/09/2020 à 14:00, David Hildenbrand a écrit : >> On 10.09.20 13:35, Laurent Dufour wrote: >>> Le 10/09/2020 à 13:12, Michal Hocko a écrit : On Thu 10-09-20 09:51:39, Laurent Dufour wrote: > Le 10/09/2020 à 09:23, Michal Hocko a écrit : >>

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Michal Hocko
On Thu 10-09-20 14:03:48, Oscar Salvador wrote: > On Thu, Sep 10, 2020 at 01:35:32PM +0200, Laurent Dufour wrote: > > > That points has been raised by David, quoting him here: > > > > > IIRC, ACPI can hotadd memory while SCHEDULING, this patch would break > > > that. > > > > > > Ccing Oscar, I

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Michal Hocko
On Thu 10-09-20 15:39:00, Oscar Salvador wrote: > On Thu, Sep 10, 2020 at 02:48:47PM +0200, Michal Hocko wrote: > > > Is there any actual usecase for a configuration like this? What is the > > > point to statically define additional memory like this when the same can > > > be achieved on the same c

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Michal Hocko
On Thu 10-09-20 14:49:28, David Hildenbrand wrote: > On 10.09.20 14:47, Michal Hocko wrote: > > On Thu 10-09-20 14:03:48, Oscar Salvador wrote: > >> On Thu, Sep 10, 2020 at 01:35:32PM +0200, Laurent Dufour wrote: > >> > >>> That points has been raised by David, quoting him here: > >>> > IIRC

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Michal Hocko
On Thu 10-09-20 15:51:07, Michal Hocko wrote: > On Thu 10-09-20 15:39:00, Oscar Salvador wrote: > > On Thu, Sep 10, 2020 at 02:48:47PM +0200, Michal Hocko wrote: [...] > > > Forgot to ask one more thing. Who is going to online that memory when > > > userspace is not running yet? > > > > Depends, i

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread David Hildenbrand
>> Also, under QEMU, just do a reboot with hotplugged memory and you're in >> the very same situation. > > OK, I didn't know that. I thought the memory would be presented as a > normal memory after reboot. Thanks for the clarification. That's one of the cases where QEMU differs to actual hardware

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Oscar Salvador
On Thu, Sep 10, 2020 at 02:48:47PM +0200, Michal Hocko wrote: > > Is there any actual usecase for a configuration like this? What is the > > point to statically define additional memory like this when the same can > > be achieved on the same command line? Well, for qemu I am not sure, but if David

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Michal Hocko
On Thu 10-09-20 14:47:56, Michal Hocko wrote: > On Thu 10-09-20 14:03:48, Oscar Salvador wrote: > > On Thu, Sep 10, 2020 at 01:35:32PM +0200, Laurent Dufour wrote: > > > > > That points has been raised by David, quoting him here: > > > > > > > IIRC, ACPI can hotadd memory while SCHEDULING, this

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Laurent Dufour
Le 10/09/2020 à 14:03, Oscar Salvador a écrit : On Thu, Sep 10, 2020 at 01:35:32PM +0200, Laurent Dufour wrote: That points has been raised by David, quoting him here: IIRC, ACPI can hotadd memory while SCHEDULING, this patch would break that. Ccing Oscar, I think he mentioned recently tha

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Oscar Salvador
On Thu, Sep 10, 2020 at 01:35:32PM +0200, Laurent Dufour wrote: > That points has been raised by David, quoting him here: > > > IIRC, ACPI can hotadd memory while SCHEDULING, this patch would break that. > > > > Ccing Oscar, I think he mentioned recently that this is the case with ACPI. > > Os

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Michal Hocko
On Thu 10-09-20 13:35:32, Laurent Dufour wrote: > Le 10/09/2020 à 13:12, Michal Hocko a écrit : > > On Thu 10-09-20 09:51:39, Laurent Dufour wrote: > > > Le 10/09/2020 à 09:23, Michal Hocko a écrit : > > > > On Wed 09-09-20 18:07:15, Laurent Dufour wrote: > > > > > Le 09/09/2020 à 12:59, Michal Hoc

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread David Hildenbrand
On 10.09.20 13:35, Laurent Dufour wrote: > Le 10/09/2020 à 13:12, Michal Hocko a écrit : >> On Thu 10-09-20 09:51:39, Laurent Dufour wrote: >>> Le 10/09/2020 à 09:23, Michal Hocko a écrit : On Wed 09-09-20 18:07:15, Laurent Dufour wrote: > Le 09/09/2020 à 12:59, Michal Hocko a écrit :

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Michal Hocko
On Thu 10-09-20 09:51:39, Laurent Dufour wrote: > Le 10/09/2020 à 09:23, Michal Hocko a écrit : > > On Wed 09-09-20 18:07:15, Laurent Dufour wrote: > > > Le 09/09/2020 à 12:59, Michal Hocko a écrit : > > > > On Wed 09-09-20 11:21:58, Laurent Dufour wrote: > > [...] > > > > > For the point a, using

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Laurent Dufour
Le 10/09/2020 à 09:23, Michal Hocko a écrit : On Wed 09-09-20 18:07:15, Laurent Dufour wrote: Le 09/09/2020 à 12:59, Michal Hocko a écrit : On Wed 09-09-20 11:21:58, Laurent Dufour wrote: [...] For the point a, using the enum allows to know in register_mem_sect_under_node() if the link operat

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-10 Thread Michal Hocko
On Wed 09-09-20 18:07:15, Laurent Dufour wrote: > Le 09/09/2020 à 12:59, Michal Hocko a écrit : > > On Wed 09-09-20 11:21:58, Laurent Dufour wrote: [...] > > > For the point a, using the enum allows to know in > > > register_mem_sect_under_node() if the link operation is due to a hotplug > > > oper

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Michal Hocko
On Wed 09-09-20 14:32:57, David Hildenbrand wrote: > On 09.09.20 14:30, Greg Kroah-Hartman wrote: > > On Wed, Sep 09, 2020 at 11:24:24AM +0200, David Hildenbrand wrote: > I am not sure an enum is going to make the existing situation less > messy. Sure we somehow have to distinguish boot i

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Laurent Dufour
Le 09/09/2020 à 12:59, Michal Hocko a écrit : On Wed 09-09-20 11:21:58, Laurent Dufour wrote: Le 09/09/2020 à 11:09, Michal Hocko a écrit : On Wed 09-09-20 09:48:59, Laurent Dufour wrote: Le 09/09/2020 à 09:40, Michal Hocko a écrit : [...] In that case, the system is able to boot but later h

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Greg Kroah-Hartman
On Wed, Sep 09, 2020 at 02:32:57PM +0200, David Hildenbrand wrote: > On 09.09.20 14:30, Greg Kroah-Hartman wrote: > > On Wed, Sep 09, 2020 at 11:24:24AM +0200, David Hildenbrand wrote: > I am not sure an enum is going to make the existing situation less > messy. Sure we somehow have to di

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread David Hildenbrand
On 09.09.20 14:30, Greg Kroah-Hartman wrote: > On Wed, Sep 09, 2020 at 11:24:24AM +0200, David Hildenbrand wrote: I am not sure an enum is going to make the existing situation less messy. Sure we somehow have to distinguish boot init and runtime hotplug because they have different co

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Greg Kroah-Hartman
On Wed, Sep 09, 2020 at 11:24:24AM +0200, David Hildenbrand wrote: > >> I am not sure an enum is going to make the existing situation less > >> messy. Sure we somehow have to distinguish boot init and runtime hotplug > >> because they have different constrains. I am arguing that a) we should > >> h

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Michal Hocko
On Wed 09-09-20 11:21:58, Laurent Dufour wrote: > Le 09/09/2020 à 11:09, Michal Hocko a écrit : > > On Wed 09-09-20 09:48:59, Laurent Dufour wrote: > > > Le 09/09/2020 à 09:40, Michal Hocko a écrit : [...] > > > > > In > > > > > that case, the system is able to boot but later hot-plug operation >

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Laurent Dufour
Le 09/09/2020 à 11:24, David Hildenbrand a écrit : I am not sure an enum is going to make the existing situation less messy. Sure we somehow have to distinguish boot init and runtime hotplug because they have different constrains. I am arguing that a) we should have a consistent way to check for

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread David Hildenbrand
>> I am not sure an enum is going to make the existing situation less >> messy. Sure we somehow have to distinguish boot init and runtime hotplug >> because they have different constrains. I am arguing that a) we should >> have a consistent way to check for those and b) we shouldn't blow up >> easi

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Laurent Dufour
Le 09/09/2020 à 11:09, Michal Hocko a écrit : On Wed 09-09-20 09:48:59, Laurent Dufour wrote: Le 09/09/2020 à 09:40, Michal Hocko a écrit : [reposting because the malformed cc list confused my email client] On Tue 08-09-20 19:08:35, Laurent Dufour wrote: In register_mem_sect_under_node() the

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Michal Hocko
On Wed 09-09-20 09:48:59, Laurent Dufour wrote: > Le 09/09/2020 à 09:40, Michal Hocko a écrit : > > [reposting because the malformed cc list confused my email client] > > > > On Tue 08-09-20 19:08:35, Laurent Dufour wrote: > > > In register_mem_sect_under_node() the system_state’s value is checked

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Laurent Dufour
Le 09/09/2020 à 09:40, Michal Hocko a écrit : [reposting because the malformed cc list confused my email client] On Tue 08-09-20 19:08:35, Laurent Dufour wrote: In register_mem_sect_under_node() the system_state’s value is checked to detect whether the operation the call is made during boot tim

Re: [PATCH] mm: don't rely on system state to detect hot-plug operations

2020-09-09 Thread Michal Hocko
[reposting because the malformed cc list confused my email client] On Tue 08-09-20 19:08:35, Laurent Dufour wrote: > In register_mem_sect_under_node() the system_state’s value is checked to > detect whether the operation the call is made during boot time or during an > hot-plug operation. Unfortun