Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-05 Thread Michal Hocko
On Wed 05-09-18 08:32:05, Alexander Duyck wrote: > On Tue, Sep 4, 2018 at 11:10 PM Michal Hocko wrote: > > > > On Tue 04-09-18 11:33:39, Alexander Duyck wrote: > > > From: Alexander Duyck > > > > > > On systems with a large amount of memory it can take a significant amount > > > of time to

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-05 Thread Michal Hocko
On Wed 05-09-18 08:32:05, Alexander Duyck wrote: > On Tue, Sep 4, 2018 at 11:10 PM Michal Hocko wrote: > > > > On Tue 04-09-18 11:33:39, Alexander Duyck wrote: > > > From: Alexander Duyck > > > > > > On systems with a large amount of memory it can take a significant amount > > > of time to

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-05 Thread Alexander Duyck
On Tue, Sep 4, 2018 at 11:10 PM Michal Hocko wrote: > > On Tue 04-09-18 11:33:39, Alexander Duyck wrote: > > From: Alexander Duyck > > > > On systems with a large amount of memory it can take a significant amount > > of time to initialize all of the page structs with the PAGE_POISON_PATTERN > >

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-05 Thread Alexander Duyck
On Tue, Sep 4, 2018 at 11:10 PM Michal Hocko wrote: > > On Tue 04-09-18 11:33:39, Alexander Duyck wrote: > > From: Alexander Duyck > > > > On systems with a large amount of memory it can take a significant amount > > of time to initialize all of the page structs with the PAGE_POISON_PATTERN > >

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-05 Thread Michal Hocko
On Tue 04-09-18 11:33:39, Alexander Duyck wrote: > From: Alexander Duyck > > On systems with a large amount of memory it can take a significant amount > of time to initialize all of the page structs with the PAGE_POISON_PATTERN > value. I have seen it take over 2 minutes to initialize a system

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-05 Thread Michal Hocko
On Tue 04-09-18 11:33:39, Alexander Duyck wrote: > From: Alexander Duyck > > On systems with a large amount of memory it can take a significant amount > of time to initialize all of the page structs with the PAGE_POISON_PATTERN > value. I have seen it take over 2 minutes to initialize a system

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Pasha Tatashin
On 9/4/18 5:13 PM, Alexander Duyck wrote: > On Tue, Sep 4, 2018 at 1:07 PM Pasha Tatashin > wrote: >> >> Hi Alexander, >> >> This is a wrong way to do it. memblock_virt_alloc_try_nid_raw() does not >> initialize allocated memory, and by setting memory to all ones in debug >> build we ensure

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Pasha Tatashin
On 9/4/18 5:13 PM, Alexander Duyck wrote: > On Tue, Sep 4, 2018 at 1:07 PM Pasha Tatashin > wrote: >> >> Hi Alexander, >> >> This is a wrong way to do it. memblock_virt_alloc_try_nid_raw() does not >> initialize allocated memory, and by setting memory to all ones in debug >> build we ensure

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Alexander Duyck
On Tue, Sep 4, 2018 at 1:07 PM Pasha Tatashin wrote: > > Hi Alexander, > > This is a wrong way to do it. memblock_virt_alloc_try_nid_raw() does not > initialize allocated memory, and by setting memory to all ones in debug > build we ensure that no callers rely on this function to return zeroed >

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Alexander Duyck
On Tue, Sep 4, 2018 at 1:07 PM Pasha Tatashin wrote: > > Hi Alexander, > > This is a wrong way to do it. memblock_virt_alloc_try_nid_raw() does not > initialize allocated memory, and by setting memory to all ones in debug > build we ensure that no callers rely on this function to return zeroed >

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Pasha Tatashin
Hi Alexander, This is a wrong way to do it. memblock_virt_alloc_try_nid_raw() does not initialize allocated memory, and by setting memory to all ones in debug build we ensure that no callers rely on this function to return zeroed memory just by accident. And, the accidents are frequent because

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Pasha Tatashin
Hi Alexander, This is a wrong way to do it. memblock_virt_alloc_try_nid_raw() does not initialize allocated memory, and by setting memory to all ones in debug build we ensure that no callers rely on this function to return zeroed memory just by accident. And, the accidents are frequent because

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Alexander Duyck
On Tue, Sep 4, 2018 at 12:25 PM Dave Hansen wrote: > > On 09/04/2018 11:33 AM, Alexander Duyck wrote: > > --- a/mm/memblock.c > > +++ b/mm/memblock.c > > @@ -1444,7 +1444,7 @@ void * __init memblock_virt_alloc_try_nid_raw( > > > > ptr = memblock_virt_alloc_internal(size, align, > >

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Alexander Duyck
On Tue, Sep 4, 2018 at 12:25 PM Dave Hansen wrote: > > On 09/04/2018 11:33 AM, Alexander Duyck wrote: > > --- a/mm/memblock.c > > +++ b/mm/memblock.c > > @@ -1444,7 +1444,7 @@ void * __init memblock_virt_alloc_try_nid_raw( > > > > ptr = memblock_virt_alloc_internal(size, align, > >

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Dave Hansen
On 09/04/2018 11:33 AM, Alexander Duyck wrote: > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -1444,7 +1444,7 @@ void * __init memblock_virt_alloc_try_nid_raw( > > ptr = memblock_virt_alloc_internal(size, align, > min_addr, max_addr, nid); >

Re: [PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Dave Hansen
On 09/04/2018 11:33 AM, Alexander Duyck wrote: > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -1444,7 +1444,7 @@ void * __init memblock_virt_alloc_try_nid_raw( > > ptr = memblock_virt_alloc_internal(size, align, > min_addr, max_addr, nid); >

[PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Alexander Duyck
From: Alexander Duyck On systems with a large amount of memory it can take a significant amount of time to initialize all of the page structs with the PAGE_POISON_PATTERN value. I have seen it take over 2 minutes to initialize a system with over 12GB of RAM. In order to work around the issue I

[PATCH 1/2] mm: Move page struct poisoning from CONFIG_DEBUG_VM to CONFIG_DEBUG_VM_PGFLAGS

2018-09-04 Thread Alexander Duyck
From: Alexander Duyck On systems with a large amount of memory it can take a significant amount of time to initialize all of the page structs with the PAGE_POISON_PATTERN value. I have seen it take over 2 minutes to initialize a system with over 12GB of RAM. In order to work around the issue I