Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-16 Thread osalvador
On Mon, 2018-11-12 at 21:28 +, Pavel Tatashin wrote: > > > > This collides with the refactoring of hmm, to be done in terms of > > devm_memremap_pages(). I'd rather not introduce another common > > function *beneath* hmm and devm_memremap_pages() and rather make > > devm_memremap_pages() the

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-16 Thread osalvador
On Mon, 2018-11-12 at 21:28 +, Pavel Tatashin wrote: > > > > This collides with the refactoring of hmm, to be done in terms of > > devm_memremap_pages(). I'd rather not introduce another common > > function *beneath* hmm and devm_memremap_pages() and rather make > > devm_memremap_pages() the

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-16 Thread osalvador
> This collides with the refactoring of hmm, to be done in terms of > devm_memremap_pages(). I'd rather not introduce another common > function *beneath* hmm and devm_memremap_pages() and rather make > devm_memremap_pages() the common function. Hi Dan, That is true. Previous version of this

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-16 Thread osalvador
> This collides with the refactoring of hmm, to be done in terms of > devm_memremap_pages(). I'd rather not introduce another common > function *beneath* hmm and devm_memremap_pages() and rather make > devm_memremap_pages() the common function. Hi Dan, That is true. Previous version of this

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-12 Thread Pavel Tatashin
> > This collides with the refactoring of hmm, to be done in terms of > devm_memremap_pages(). I'd rather not introduce another common > function *beneath* hmm and devm_memremap_pages() and rather make > devm_memremap_pages() the common function. > > I plan to resubmit that cleanup after

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-12 Thread Pavel Tatashin
> > This collides with the refactoring of hmm, to be done in terms of > devm_memremap_pages(). I'd rather not introduce another common > function *beneath* hmm and devm_memremap_pages() and rather make > devm_memremap_pages() the common function. > > I plan to resubmit that cleanup after

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-12 Thread Dan Williams
On Mon, Oct 15, 2018 at 8:31 AM Oscar Salvador wrote: > > From: Oscar Salvador > > HMM/devm have a particular handling of memory-hotplug. > They do not go through the common path, and so, they do not > call either offline_pages() or online_pages(). > > The operations they perform are the

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-12 Thread Dan Williams
On Mon, Oct 15, 2018 at 8:31 AM Oscar Salvador wrote: > > From: Oscar Salvador > > HMM/devm have a particular handling of memory-hotplug. > They do not go through the common path, and so, they do not > call either offline_pages() or online_pages(). > > The operations they perform are the

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-12 Thread Pavel Tatashin
On 18-10-15 17:30:31, Oscar Salvador wrote: > From: Oscar Salvador > > HMM/devm have a particular handling of memory-hotplug. > They do not go through the common path, and so, they do not > call either offline_pages() or online_pages(). > > The operations they perform are the following ones: >

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-11-12 Thread Pavel Tatashin
On 18-10-15 17:30:31, Oscar Salvador wrote: > From: Oscar Salvador > > HMM/devm have a particular handling of memory-hotplug. > They do not go through the common path, and so, they do not > call either offline_pages() or online_pages(). > > The operations they perform are the following ones: >

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-18 Thread Oscar Salvador
On Wed, Oct 17, 2018 at 11:45:50AM +0200, David Hildenbrand wrote: > Here you go ;) > > Reviewed-by: David Hildenbrand thanks! > I'm planning to look into the other patches as well, but I'll be busy > with traveling and KVM forum the next 1.5 weeks. No need to hurry, this can wait. -- Oscar

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-18 Thread Oscar Salvador
On Wed, Oct 17, 2018 at 11:45:50AM +0200, David Hildenbrand wrote: > Here you go ;) > > Reviewed-by: David Hildenbrand thanks! > I'm planning to look into the other patches as well, but I'll be busy > with traveling and KVM forum the next 1.5 weeks. No need to hurry, this can wait. -- Oscar

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-17 Thread David Hildenbrand
On 17/10/2018 11:33, Oscar Salvador wrote: >>> /* >>> * For device private memory we call add_pages() as we only need to >>> * allocate and initialize struct page for the device memory. More- >>> @@ -1096,20 +1100,17 @@ static int hmm_devmem_pages_create(struct >>> hmm_devmem

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-17 Thread David Hildenbrand
On 17/10/2018 11:33, Oscar Salvador wrote: >>> /* >>> * For device private memory we call add_pages() as we only need to >>> * allocate and initialize struct page for the device memory. More- >>> @@ -1096,20 +1100,17 @@ static int hmm_devmem_pages_create(struct >>> hmm_devmem

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-17 Thread Oscar Salvador
> > /* > > * For device private memory we call add_pages() as we only need to > > * allocate and initialize struct page for the device memory. More- > > @@ -1096,20 +1100,17 @@ static int hmm_devmem_pages_create(struct > > hmm_devmem *devmem) > > * want the linear mapping and

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-17 Thread Oscar Salvador
> > /* > > * For device private memory we call add_pages() as we only need to > > * allocate and initialize struct page for the device memory. More- > > @@ -1096,20 +1100,17 @@ static int hmm_devmem_pages_create(struct > > hmm_devmem *devmem) > > * want the linear mapping and

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-16 Thread David Hildenbrand
> index 42d79bcc8aab..d3e52ae71bd9 100644 > --- a/mm/hmm.c > +++ b/mm/hmm.c > @@ -996,6 +996,7 @@ static void hmm_devmem_release(struct device *dev, void > *data) > struct zone *zone; > struct page *page; > int nid; > + bool mapping; > > if

Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-16 Thread David Hildenbrand
> index 42d79bcc8aab..d3e52ae71bd9 100644 > --- a/mm/hmm.c > +++ b/mm/hmm.c > @@ -996,6 +996,7 @@ static void hmm_devmem_release(struct device *dev, void > *data) > struct zone *zone; > struct page *page; > int nid; > + bool mapping; > > if

[PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-15 Thread Oscar Salvador
From: Oscar Salvador HMM/devm have a particular handling of memory-hotplug. They do not go through the common path, and so, they do not call either offline_pages() or online_pages(). The operations they perform are the following ones: 1) Create the linear mapping in case the memory is not

[PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions

2018-10-15 Thread Oscar Salvador
From: Oscar Salvador HMM/devm have a particular handling of memory-hotplug. They do not go through the common path, and so, they do not call either offline_pages() or online_pages(). The operations they perform are the following ones: 1) Create the linear mapping in case the memory is not