Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-24 Thread Mark Rutland
On Wed, Apr 24, 2019 at 11:29:28AM +0530, Anshuman Khandual wrote: > On 04/23/2019 09:35 PM, Mark Rutland wrote: > > On Tue, Apr 23, 2019 at 01:01:58PM +0530, Anshuman Khandual wrote: > >> Generic usage for init_mm.pagetable_lock > >> > >> Unless I have missed something else these are the generic

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-24 Thread Anshuman Khandual
On 04/23/2019 09:35 PM, Mark Rutland wrote: > On Tue, Apr 23, 2019 at 01:01:58PM +0530, Anshuman Khandual wrote: >> Generic usage for init_mm.pagetable_lock >> >> Unless I have missed something else these are the generic init_mm kernel >> page table >> modifiers at runtime (at least which uses

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-23 Thread Mark Rutland
On Tue, Apr 23, 2019 at 01:01:58PM +0530, Anshuman Khandual wrote: > Generic usage for init_mm.pagetable_lock > > Unless I have missed something else these are the generic init_mm kernel page > table > modifiers at runtime (at least which uses init_mm.page_table_lock) > > 1.

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-23 Thread Anshuman Khandual
On 04/23/2019 01:21 PM, David Hildenbrand wrote: > On 23.04.19 09:45, Anshuman Khandual wrote: >> >> >> On 04/23/2019 01:07 PM, David Hildenbrand wrote: >>> On 23.04.19 09:31, Anshuman Khandual wrote: On 04/18/2019 10:58 AM, Anshuman Khandual wrote: > On 04/17/2019 11:09 PM,

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-23 Thread David Hildenbrand
On 23.04.19 09:45, Anshuman Khandual wrote: > > > On 04/23/2019 01:07 PM, David Hildenbrand wrote: >> On 23.04.19 09:31, Anshuman Khandual wrote: >>> >>> >>> On 04/18/2019 10:58 AM, Anshuman Khandual wrote: On 04/17/2019 11:09 PM, Mark Rutland wrote: > On Wed, Apr 17, 2019 at 10:15:35PM

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-23 Thread Anshuman Khandual
On 04/23/2019 01:07 PM, David Hildenbrand wrote: > On 23.04.19 09:31, Anshuman Khandual wrote: >> >> >> On 04/18/2019 10:58 AM, Anshuman Khandual wrote: >>> On 04/17/2019 11:09 PM, Mark Rutland wrote: On Wed, Apr 17, 2019 at 10:15:35PM +0530, Anshuman Khandual wrote: > On 04/17/2019

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-23 Thread David Hildenbrand
On 23.04.19 09:31, Anshuman Khandual wrote: > > > On 04/18/2019 10:58 AM, Anshuman Khandual wrote: >> On 04/17/2019 11:09 PM, Mark Rutland wrote: >>> On Wed, Apr 17, 2019 at 10:15:35PM +0530, Anshuman Khandual wrote: On 04/17/2019 07:51 PM, Mark Rutland wrote: > On Wed, Apr 17, 2019 at

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-23 Thread Anshuman Khandual
On 04/18/2019 10:58 AM, Anshuman Khandual wrote: > On 04/17/2019 11:09 PM, Mark Rutland wrote: >> On Wed, Apr 17, 2019 at 10:15:35PM +0530, Anshuman Khandual wrote: >>> On 04/17/2019 07:51 PM, Mark Rutland wrote: On Wed, Apr 17, 2019 at 03:28:18PM +0530, Anshuman Khandual wrote: > On

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-17 Thread Anshuman Khandual
On 04/17/2019 11:09 PM, Mark Rutland wrote: > On Wed, Apr 17, 2019 at 10:15:35PM +0530, Anshuman Khandual wrote: >> On 04/17/2019 07:51 PM, Mark Rutland wrote: >>> On Wed, Apr 17, 2019 at 03:28:18PM +0530, Anshuman Khandual wrote: On 04/15/2019 07:18 PM, Mark Rutland wrote: > On Sun, Apr

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-17 Thread Mark Rutland
On Wed, Apr 17, 2019 at 10:15:35PM +0530, Anshuman Khandual wrote: > On 04/17/2019 07:51 PM, Mark Rutland wrote: > > On Wed, Apr 17, 2019 at 03:28:18PM +0530, Anshuman Khandual wrote: > >> On 04/15/2019 07:18 PM, Mark Rutland wrote: > >>> On Sun, Apr 14, 2019 at 11:29:13AM +0530, Anshuman Khandual

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-17 Thread Anshuman Khandual
On 04/17/2019 07:51 PM, Mark Rutland wrote: > On Wed, Apr 17, 2019 at 03:28:18PM +0530, Anshuman Khandual wrote: >> On 04/15/2019 07:18 PM, Mark Rutland wrote: >>> On Sun, Apr 14, 2019 at 11:29:13AM +0530, Anshuman Khandual wrote: Memory removal from an arch perspective involves tearing

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-17 Thread Mark Rutland
On Wed, Apr 17, 2019 at 03:28:18PM +0530, Anshuman Khandual wrote: > On 04/15/2019 07:18 PM, Mark Rutland wrote: > > On Sun, Apr 14, 2019 at 11:29:13AM +0530, Anshuman Khandual wrote: > >> Memory removal from an arch perspective involves tearing down two different > >> kernel based mappings i.e

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-17 Thread Anshuman Khandual
On 04/15/2019 07:18 PM, Mark Rutland wrote: > Hi Anshuman, > > On Sun, Apr 14, 2019 at 11:29:13AM +0530, Anshuman Khandual wrote: >> Memory removal from an arch perspective involves tearing down two different >> kernel based mappings i.e vmemmap and linear while releasing related page >> table

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-16 Thread Anshuman Khandual
On 04/15/2019 07:25 PM, David Hildenbrand wrote: >> + >> +#ifdef CONFIG_MEMORY_HOTREMOVE >> +int arch_remove_memory(int nid, u64 start, u64 size, struct vmem_altmap >> *altmap) >> +{ >> +unsigned long start_pfn = start >> PAGE_SHIFT; >> +unsigned long nr_pages = size >> PAGE_SHIFT; >>

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-15 Thread David Hildenbrand
> + > +#ifdef CONFIG_MEMORY_HOTREMOVE > +int arch_remove_memory(int nid, u64 start, u64 size, struct vmem_altmap > *altmap) > +{ > + unsigned long start_pfn = start >> PAGE_SHIFT; > + unsigned long nr_pages = size >> PAGE_SHIFT; > + struct zone *zone =

Re: [PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-15 Thread Mark Rutland
Hi Anshuman, On Sun, Apr 14, 2019 at 11:29:13AM +0530, Anshuman Khandual wrote: > Memory removal from an arch perspective involves tearing down two different > kernel based mappings i.e vmemmap and linear while releasing related page > table pages allocated for the physical memory range to be

[PATCH V2 2/2] arm64/mm: Enable memory hot remove

2019-04-14 Thread Anshuman Khandual
Memory removal from an arch perspective involves tearing down two different kernel based mappings i.e vmemmap and linear while releasing related page table pages allocated for the physical memory range to be removed. Define a common kernel page table tear down helper remove_pagetable() which can