Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-30 Thread David Hildenbrand
On 30.06.20 00:58, Wei Yang wrote: > On Mon, Jun 29, 2020 at 03:13:25PM -0700, Dan Williams wrote: >> On Mon, Jun 29, 2020 at 1:34 AM Wei Yang >> wrote: >>> >>> On Thu, Jun 25, 2020 at 12:46:43PM -0700, Dan Williams wrote: On Wed, Jun 24, 2020 at 10:53 PM David Hildenbrand wrote: >

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-29 Thread Wei Yang
On Mon, Jun 29, 2020 at 03:13:25PM -0700, Dan Williams wrote: >On Mon, Jun 29, 2020 at 1:34 AM Wei Yang > wrote: >> >> On Thu, Jun 25, 2020 at 12:46:43PM -0700, Dan Williams wrote: >> >On Wed, Jun 24, 2020 at 10:53 PM David Hildenbrand wrote: >> >> >> >> >> >> >> >> > Am 25.06.2020 um 01:47 schrie

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-29 Thread Dan Williams
On Mon, Jun 29, 2020 at 1:34 AM Wei Yang wrote: > > On Thu, Jun 25, 2020 at 12:46:43PM -0700, Dan Williams wrote: > >On Wed, Jun 24, 2020 at 10:53 PM David Hildenbrand wrote: > >> > >> > >> > >> > Am 25.06.2020 um 01:47 schrieb Dan Williams : > >> > > >> > On Wed, Jun 24, 2020 at 3:44 PM Wei Yan

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-25 Thread David Hildenbrand
> Am 26.06.2020 um 00:40 schrieb Wei Yang : > > On Thu, Jun 25, 2020 at 07:53:37AM +0200, David Hildenbrand wrote: >> >> Am 25.06.2020 um 01:47 schrieb Dan Williams : >>> >>> On Wed, Jun 24, 2020 at 3:44 PM Wei Yang >>> wrote: >>> [..] > So, you are right that there is a mismatch

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-25 Thread Wei Yang
On Thu, Jun 25, 2020 at 07:53:37AM +0200, David Hildenbrand wrote: > > >> Am 25.06.2020 um 01:47 schrieb Dan Williams : >> >> On Wed, Jun 24, 2020 at 3:44 PM Wei Yang >> wrote: >> [..] So, you are right that there is a mismatch here, but I think the comprehensive fix is to allow early

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-25 Thread Wei Yang
On Thu, Jun 25, 2020 at 12:46:43PM -0700, Dan Williams wrote: >On Wed, Jun 24, 2020 at 10:53 PM David Hildenbrand wrote: >> >> >> >> > Am 25.06.2020 um 01:47 schrieb Dan Williams : >> > >> > On Wed, Jun 24, 2020 at 3:44 PM Wei Yang >> > wrote: >> > [..] >> >>> So, you are right that there is a m

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-25 Thread Dan Williams
On Wed, Jun 24, 2020 at 10:53 PM David Hildenbrand wrote: > > > > > Am 25.06.2020 um 01:47 schrieb Dan Williams : > > > > On Wed, Jun 24, 2020 at 3:44 PM Wei Yang > > wrote: > > [..] > >>> So, you are right that there is a mismatch here, but I think the > >>> comprehensive fix is to allow early

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread David Hildenbrand
> Am 25.06.2020 um 01:47 schrieb Dan Williams : > > On Wed, Jun 24, 2020 at 3:44 PM Wei Yang > wrote: > [..] >>> So, you are right that there is a mismatch here, but I think the >>> comprehensive fix is to allow early sections to be partially >>> depopulated/repopulated rather than have secti

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Dan Williams
On Wed, Jun 24, 2020 at 3:44 PM Wei Yang wrote: [..] > >So, you are right that there is a mismatch here, but I think the > >comprehensive fix is to allow early sections to be partially > >depopulated/repopulated rather than have section_activate() and > >section_deacticate() special case early sec

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Wei Yang
On Wed, Jun 24, 2020 at 03:20:59PM -0700, Dan Williams wrote: >On Wed, Jun 24, 2020 at 3:06 PM Wei Yang > wrote: >> >> On Wed, Jun 24, 2020 at 09:10:09AM -0700, Dan Williams wrote: >> >On Tue, Jun 23, 2020 at 11:14 PM Wei Yang >> > wrote: >> >> >> >> On Tue, Jun 23, 2020 at 05:18:28PM +0200, Michal

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Wei Yang
On Wed, Jun 24, 2020 at 10:41:18AM +0200, David Hildenbrand wrote: >On 24.06.20 10:13, Wei Yang wrote: >> On Wed, Jun 24, 2020 at 09:48:43AM +0200, David Hildenbrand wrote: >>> On 23.06.20 17:18, Michal Hocko wrote: On Tue 23-06-20 17:42:58, Wei Yang wrote: > For early sections, we assumes

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Dan Williams
On Wed, Jun 24, 2020 at 3:06 PM Wei Yang wrote: > > On Wed, Jun 24, 2020 at 09:10:09AM -0700, Dan Williams wrote: > >On Tue, Jun 23, 2020 at 11:14 PM Wei Yang > > wrote: > >> > >> On Tue, Jun 23, 2020 at 05:18:28PM +0200, Michal Hocko wrote: > >> >On Tue 23-06-20 17:42:58, Wei Yang wrote: > >> >>

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Wei Yang
On Wed, Jun 24, 2020 at 10:51:08AM +0200, David Hildenbrand wrote: >On 24.06.20 05:56, Wei Yang wrote: >> On Wed, Jun 24, 2020 at 11:52:36AM +0800, Baoquan He wrote: >>> On 06/24/20 at 11:46am, Wei Yang wrote: On Wed, Jun 24, 2020 at 09:47:37AM +0800, Baoquan He wrote: > On 06/23/20 at 05:

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Wei Yang
On Wed, Jun 24, 2020 at 09:10:09AM -0700, Dan Williams wrote: >On Tue, Jun 23, 2020 at 11:14 PM Wei Yang > wrote: >> >> On Tue, Jun 23, 2020 at 05:18:28PM +0200, Michal Hocko wrote: >> >On Tue 23-06-20 17:42:58, Wei Yang wrote: >> >> For early sections, we assumes its memmap will never be partially

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Dan Williams
On Tue, Jun 23, 2020 at 11:14 PM Wei Yang wrote: > > On Tue, Jun 23, 2020 at 05:18:28PM +0200, Michal Hocko wrote: > >On Tue 23-06-20 17:42:58, Wei Yang wrote: > >> For early sections, we assumes its memmap will never be partially > >> removed. But current behavior breaks this. > >> > >> Let's cor

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread David Hildenbrand
On 24.06.20 05:56, Wei Yang wrote: > On Wed, Jun 24, 2020 at 11:52:36AM +0800, Baoquan He wrote: >> On 06/24/20 at 11:46am, Wei Yang wrote: >>> On Wed, Jun 24, 2020 at 09:47:37AM +0800, Baoquan He wrote: On 06/23/20 at 05:21pm, Dan Williams wrote: > On Tue, Jun 23, 2020 at 2:43 AM Wei Yang

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Michal Hocko
On Wed 24-06-20 10:41:18, David Hildenbrand wrote: [...] > But nothing actually breaks because *drummroll* we use huge pages in the > vmemmap, > so the partial depopulate will not actually depopulate anything here. Huge > page is 2M, > the memmap of 128MB sections is exactly 2MB == one hugep

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread David Hildenbrand
On 24.06.20 10:13, Wei Yang wrote: > On Wed, Jun 24, 2020 at 09:48:43AM +0200, David Hildenbrand wrote: >> On 23.06.20 17:18, Michal Hocko wrote: >>> On Tue 23-06-20 17:42:58, Wei Yang wrote: For early sections, we assumes its memmap will never be partially removed. But current behavior b

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread Wei Yang
On Wed, Jun 24, 2020 at 09:48:43AM +0200, David Hildenbrand wrote: >On 23.06.20 17:18, Michal Hocko wrote: >> On Tue 23-06-20 17:42:58, Wei Yang wrote: >>> For early sections, we assumes its memmap will never be partially >>> removed. But current behavior breaks this. >>> >>> Let's correct it. >>>

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread David Hildenbrand
On 24.06.20 09:48, David Hildenbrand wrote: > On 23.06.20 17:18, Michal Hocko wrote: >> On Tue 23-06-20 17:42:58, Wei Yang wrote: >>> For early sections, we assumes its memmap will never be partially >>> removed. But current behavior breaks this. >>> >>> Let's correct it. >>> >>> Fixes: ba72b4c8cf6

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-24 Thread David Hildenbrand
On 23.06.20 17:18, Michal Hocko wrote: > On Tue 23-06-20 17:42:58, Wei Yang wrote: >> For early sections, we assumes its memmap will never be partially >> removed. But current behavior breaks this. >> >> Let's correct it. >> >> Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") >> Si

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Wei Yang
On Tue, Jun 23, 2020 at 05:18:28PM +0200, Michal Hocko wrote: >On Tue 23-06-20 17:42:58, Wei Yang wrote: >> For early sections, we assumes its memmap will never be partially >> removed. But current behavior breaks this. >> >> Let's correct it. >> >> Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Wei Yang
On Wed, Jun 24, 2020 at 11:52:36AM +0800, Baoquan He wrote: >On 06/24/20 at 11:46am, Wei Yang wrote: >> On Wed, Jun 24, 2020 at 09:47:37AM +0800, Baoquan He wrote: >> >On 06/23/20 at 05:21pm, Dan Williams wrote: >> >> On Tue, Jun 23, 2020 at 2:43 AM Wei Yang >> >> wrote: >> >> > >> >> > For early

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Baoquan He
On 06/24/20 at 11:46am, Wei Yang wrote: > On Wed, Jun 24, 2020 at 09:47:37AM +0800, Baoquan He wrote: > >On 06/23/20 at 05:21pm, Dan Williams wrote: > >> On Tue, Jun 23, 2020 at 2:43 AM Wei Yang > >> wrote: > >> > > >> > For early sections, we assumes its memmap will never be partially > >> > remo

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Wei Yang
On Wed, Jun 24, 2020 at 09:47:37AM +0800, Baoquan He wrote: >On 06/23/20 at 05:21pm, Dan Williams wrote: >> On Tue, Jun 23, 2020 at 2:43 AM Wei Yang >> wrote: >> > >> > For early sections, we assumes its memmap will never be partially >> > removed. But current behavior breaks this. >> >> Where do

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Baoquan He
On 06/24/20 at 09:47am, Baoquan He wrote: > On 06/23/20 at 05:21pm, Dan Williams wrote: > > On Tue, Jun 23, 2020 at 2:43 AM Wei Yang > > wrote: > > > > > > For early sections, we assumes its memmap will never be partially > > > removed. But current behavior breaks this. > > > > Where do we assume

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Baoquan He
On 06/23/20 at 05:21pm, Dan Williams wrote: > On Tue, Jun 23, 2020 at 2:43 AM Wei Yang > wrote: > > > > For early sections, we assumes its memmap will never be partially > > removed. But current behavior breaks this. > > Where do we assume that? > > The primary use case for this was mapping pmem

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Wei Yang
On Tue, Jun 23, 2020 at 05:21:06PM -0700, Dan Williams wrote: >On Tue, Jun 23, 2020 at 2:43 AM Wei Yang > wrote: >> >> For early sections, we assumes its memmap will never be partially >> removed. But current behavior breaks this. > >Where do we assume that? > >The primary use case for this was map

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Dan Williams
On Tue, Jun 23, 2020 at 2:43 AM Wei Yang wrote: > > For early sections, we assumes its memmap will never be partially > removed. But current behavior breaks this. Where do we assume that? The primary use case for this was mapping pmem that collides with System-RAM in the same 128MB section. That

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Wei Yang
On Tue, Jun 23, 2020 at 05:18:28PM +0200, Michal Hocko wrote: >On Tue 23-06-20 17:42:58, Wei Yang wrote: >> For early sections, we assumes its memmap will never be partially >> removed. But current behavior breaks this. >> >> Let's correct it. >> >> Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Michal Hocko
On Tue 23-06-20 17:42:58, Wei Yang wrote: > For early sections, we assumes its memmap will never be partially > removed. But current behavior breaks this. > > Let's correct it. > > Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") > Signed-off-by: Wei Yang Can a user trigger thi

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread David Hildenbrand
On 23.06.20 15:02, Wei Yang wrote: > On Tue, Jun 23, 2020 at 02:44:02PM +0200, David Hildenbrand wrote: >> On 23.06.20 11:42, Wei Yang wrote: >>> For early sections, we assumes its memmap will never be partially >>> removed. But current behavior breaks this. >>> >>> Let's correct it. >>> >>> Fixes:

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread Wei Yang
On Tue, Jun 23, 2020 at 02:44:02PM +0200, David Hildenbrand wrote: >On 23.06.20 11:42, Wei Yang wrote: >> For early sections, we assumes its memmap will never be partially >> removed. But current behavior breaks this. >> >> Let's correct it. >> >> Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-s

Re: [PATCH] mm/spase: never partially remove memmap for early section

2020-06-23 Thread David Hildenbrand
On 23.06.20 11:42, Wei Yang wrote: > For early sections, we assumes its memmap will never be partially > removed. But current behavior breaks this. > > Let's correct it. > > Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") > Signed-off-by: Wei Yang > --- > mm/sparse.c | 6 +++--