Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-12 Thread Anshuman Khandual
On 1/12/21 3:39 PM, David Hildenbrand wrote: > On 12.01.21 04:51, Anshuman Khandual wrote: >> >> >> On 1/11/21 7:13 PM, Oscar Salvador wrote: >>> On Mon, Jan 11, 2021 at 11:51:47AM +0100, David Hildenbrand wrote: AFAIKs, all memhp_get_pluggable_range() users pass "1". What about

Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-12 Thread David Hildenbrand
On 12.01.21 04:51, Anshuman Khandual wrote: > > > On 1/11/21 7:13 PM, Oscar Salvador wrote: >> On Mon, Jan 11, 2021 at 11:51:47AM +0100, David Hildenbrand wrote: >>> AFAIKs, all memhp_get_pluggable_range() users pass "1". >>> >>> What about the "add_pages()-only" path? >> >> I guess you refer to

Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-11 Thread Anshuman Khandual
On 1/11/21 7:13 PM, Oscar Salvador wrote: > On Mon, Jan 11, 2021 at 11:51:47AM +0100, David Hildenbrand wrote: >> AFAIKs, all memhp_get_pluggable_range() users pass "1". >> >> What about the "add_pages()-only" path? > > I guess you refer to memremap_pages(), right? Right, via pagemap_range().

Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-11 Thread Anshuman Khandual
On 1/11/21 4:21 PM, David Hildenbrand wrote: > On 17.12.20 16:28, Anshuman Khandual wrote: >> This introduces memhp_range_allowed() which can be called in various memory >> hotplug paths to prevalidate the address range which is being added, with >> the platform. Then memhp_range_allowed()

Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-11 Thread Oscar Salvador
On Mon, Jan 11, 2021 at 11:51:47AM +0100, David Hildenbrand wrote: > AFAIKs, all memhp_get_pluggable_range() users pass "1". > > What about the "add_pages()-only" path? I guess you refer to memremap_pages(), right? If so, moving the added memhp_range_allowed() check above the if-else might do

Re: [PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2021-01-11 Thread David Hildenbrand
On 17.12.20 16:28, Anshuman Khandual wrote: > This introduces memhp_range_allowed() which can be called in various memory > hotplug paths to prevalidate the address range which is being added, with > the platform. Then memhp_range_allowed() calls memhp_get_pluggable_range() > which provides

[PATCH V2 1/3] mm/hotplug: Prevalidate the address range being added with platform

2020-12-17 Thread Anshuman Khandual
This introduces memhp_range_allowed() which can be called in various memory hotplug paths to prevalidate the address range which is being added, with the platform. Then memhp_range_allowed() calls memhp_get_pluggable_range() which provides applicable address range depending on whether linear