Re: [PATCH 3/3] mm/memory_hotplug: Cleanup unregister_mem_sect_under_nodes

2018-08-13 Thread Oscar Salvador
On Fri, Aug 10, 2018 at 05:29:31PM +0200, osalva...@techadventures.net wrote: > From: Oscar Salvador > > With the assumption that the relationship between > memory_block <-> node is 1:1, we can refactor this function a bit. > > This assumption is being taken from register_mem_sect_under_node() >

Re: [PATCH 3/3] mm/memory_hotplug: Cleanup unregister_mem_sect_under_nodes

2018-08-11 Thread Oscar Salvador
On Fri, Aug 10, 2018 at 03:37:27PM -0700, Andrew Morton wrote: > I guess so. But the node_online() check was silently removed? A node can only get offline if all the memory and CPUs associated with it are removed. This is being checked in remove_memory()->try_offline_node(). There we check wheth

Re: [PATCH 3/3] mm/memory_hotplug: Cleanup unregister_mem_sect_under_nodes

2018-08-10 Thread Andrew Morton
On Fri, 10 Aug 2018 17:29:31 +0200 osalva...@techadventures.net wrote: > From: Oscar Salvador > > With the assumption that the relationship between > memory_block <-> node is 1:1, we can refactor this function a bit. > > This assumption is being taken from register_mem_sect_under_node() > code.

[PATCH 3/3] mm/memory_hotplug: Cleanup unregister_mem_sect_under_nodes

2018-08-10 Thread osalvador
From: Oscar Salvador With the assumption that the relationship between memory_block <-> node is 1:1, we can refactor this function a bit. This assumption is being taken from register_mem_sect_under_node() code. register_mem_sect_under_node() takes the mem_blk's nid, and compares it to the pfn's